     }
     
     
-    private func retrieveParagraph() -> NSMutableParagraphStyle?{
+    private func retrieveParagraph() -> NSMutableParagraphStyle? {
         if !isAnyNotNil(leading, alignment, lineBreakMode, lineHeightMultiplier,
             paragraphSpacingAfter, paragraphSpacingBefore, headIndent, tailIndent,
             firstLineHeadIndent, minimumLineHeight, maximumLineHeight, hyphenationFactor,

        }
        self.underlineColor = attributes[NSUnderlineColorAttributeName] as? UIColor
        self.URL = attributes[NSLinkAttributeName] as? NSURL
    }
}




extension Attributes {
    var rawAttributes: RawAttributes {
        var result: RawAttributes = [:]
        result[NSBackgroundColorAttributeName] = backgroundColor
        result[NSBaselineOffsetAttributeName] = baseline
        result[NSForegroundColorAttributeName] = color
        result[NSVerticalGlyphFormAttributeName] = direction?.intValue
        result[NSExpansionAttributeName] = expansion
        result[NSFontAttributeName] = font
        result[NSKernAttributeName] = kern
        if let ligature = ligature {
            result[NSLigatureAttributeName] = ligature ? 1 : 0
        }
        if let paragraph = retrieveParagraph() {
            result[NSParagraphStyleAttributeName] = paragraph
        }
        result[NSStrikethroughStyleAttributeName] = strikethrough?.rawValue
        result[NSStrikethroughColorAttributeName] = strikethroughColor
        result[NSStrokeWidthAttributeName] = stroke?.floatValue
        result[NSStrokeColorAttributeName] = strokeColor
        result[NSObliquenessAttributeName] = obliqueness
        result[NSTextEffectAttributeName] = textEffect?.stringValue
        result[NSUnderlineStyleAttributeName] = underline?.rawValue
        result[NSUnderlineColorAttributeName] = underlineColor
        result[NSLinkAttributeName] = URL
        
        return result
    }

    private func isAnyNotNil(objects: Any? ...) -> Bool {
        for object in objects {
            if object != nil {
