     public var unescapeHTML: String {
         var buffer = [unichar](repeating: 0, count: utf16.count)
         NSString(string: self).getCharacters(&buffer)
-
+        
         var end = buffer.endIndex
         let ampersand = unichar(UInt8(ascii: "&"))
         let semicolon = unichar(UInt8(ascii: ";"))
         let sharp = unichar(UInt8(ascii: "#"))
         let hexPrefixes = ["X", "x"].map { unichar(UInt8(ascii: $0)) }
-
+        
         while let begin = buffer.prefix(upTo: end).reversed().index(of: ampersand).map({ buffer.index(before: $0.base) }) {
             defer { end = begin }
             // if we don't find a semicolon in the range, we don't have a sequence


// MARK: -

/**
 Comparator for HtmlEscapeMap structure.
 */

    let u  = (u1 & 0b0000001111000000) >> 6 + 1
    let x1 = (u1 & 0b0000000000111111)
    let x2 = (u2 & 0b0000001111111111)
    return (UInt(u) << 16) + (UInt(x1) << 10) + UInt(x2)
}

/**
 Convert a surrogate pair to HTML escaping string which is composed of Unicode scalar value.
 - parameter first: First one of a surrogate pair.
 - parameter second: Second one of a surrogate pair.
 - returns: String, HTML escaping string which is composed of Unicode scalar value.
 */
private func convertToUnicodeScalarString(firstOfSurrogatePair u1: unichar, second u2: unichar) -> [unichar]? {
    guard let unicodeScalar = convertToUnicodeScalar(firstOfSurrogatePair: u1, second: u2) else { return nil }
    
    let hexArray = (0...3).reversed().map({ (unicodeScalar >> ($0 * 8)) & 255 })
    
    let ampersand = unichar(UInt8(ascii: "&"))
    let semicolon = unichar(UInt8(ascii: ";"))
    let sharp = unichar(UInt8(ascii: "#"))
    let x = unichar(UInt8(ascii: "x"))
    let uc: [unichar] = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F"].map({unichar(UInt8(ascii: $0))})
    let hexCharacters = hexArray
        .map({ [Int($0 / 16), Int($0 % 16)] })
        .flatMap({$0})
        .reduce([]) { (result, value) -> [Int] in
