 		}
 	}
 }
+
+// MARK: - Array
+
+private extension Array where Element: Hashable {
+
+    mutating func insertFront(_ element: Element) {
+        self.insert(element, at: 0)
+    }
+
+    mutating func insertBack(_ element: Element) {
+        self.append(element)
+    }
+}

				guard self.ignoreParagraphStyles == false else { return }
				guard let paragraphStyle = value as? NSParagraphStyle else { return }

				styles += "text-align: \(paragraphStyle.alignment.htmlAttributeValue); "
			case .baselineOffset:
				guard let offset = value as? Float else { return }

				styles += "-cocoa-baseline-offset: \(offset); "
			case NSAttributedStringKey(rawValue: "NSSuperScript"):
                guard let offset = value as? Int, offset != 0 else { return }

                let verticalAlignment = offset > 0 ? "super" : "sub"
                styles += "vertical-align: \(verticalAlignment); "
                styles += "-cocoa-vertical-align: \(offset); "
			default:
				assertionFailure("did not handle \(key)")
			}

	func makeOpenTag() -> String {
		guard !self.attributes.isEmpty else { return self.defaultName.openTag() }

        var styles: [String] = []
        var links = ""

		self.attributes.forEach { key, value in
			switch key {
			case .backgroundColor:
				guard let color = value as? Color else { return }

                styles.insertFront("background-color: " + self.makeCSSrgba(for: color))
			case .foregroundColor:
				guard let color = value as? Color else { return }

                styles.insertFront("color: " + self.makeCSSrgba(for: color))
			case .underlineStyle:
				guard let underlineStyle = self.underlineStyle(from: value) else { return }

                styles.insertFront("text-decoration: underline")
                styles.insertBack("-cocoa-underline: \(underlineStyle)")
			case .underlineColor:
				guard let color = value as? Color else { return }

                styles.insertBack("-cocoa-underline-color: " + self.makeCSSrgba(for: color))
			case .strikethroughColor:
				guard let color = value as? Color else { return }

                styles.insertBack("-cocoa-strikethrough-color: " + self.makeCSSrgba(for: color))
			case .strikethroughStyle:
				guard let underlineStyle = self.underlineStyle(from: value) else { return }

                styles.insertFront("text-decoration: line-through")
                styles.insertBack("-cocoa-strikethrough: \(underlineStyle)")
			case .font:
				guard let font = value as? Font else { return }


				let fontDescriptor = font.fontDescriptor

				var fontStyle = "font: "
                #if os(iOS)
				if fontDescriptor.symbolicTraits.contains(.traitBold) {
					fontStyle += "bold "
				}
				if fontDescriptor.symbolicTraits.contains(.traitItalic) {
					fontStyle += "italic "
				}
                #elseif os(macOS)
                    if fontDescriptor.symbolicTraits.contains(.bold) {
                        fontStyle += "bold "
                    }
                    if fontDescriptor.symbolicTraits.contains(.italic) {
                        fontStyle += "italic "
                    }
                #endif

				fontStyle += String(format: "%gpx ", fontDescriptor.pointSize)
				fontStyle += "\"\(font.cpFamilyName)\""

                styles.insertFront(fontStyle)
                styles.insertBack("-cocoa-font-postscriptname: \"\(fontDescriptor.cpPostscriptName)\"")

				let uiUsageAttribute = FontDescriptor.AttributeName.init(rawValue: "NSCTFontUIUsageAttribute")
				if let uiUsage = fontDescriptor.fontAttributes[uiUsageAttribute] {
                    styles.insertBack("-cocoa-font-uiusage: \"\(uiUsage)\"")
				}
			case .link:
				guard let url = value as? URL else { return }
