Skip to content

Commit 2bdd78d

Browse files
committed
Remove unused style code.
1 parent 4b6cc3d commit 2bdd78d

1 file changed

Lines changed: 0 additions & 26 deletions

File tree

Aztec/Classes/NSAttributedString/Conversions/AttributedStringSerializer.swift

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -181,32 +181,6 @@ class AttributedStringSerializer {
181181

182182
return content
183183
}
184-
185-
// MARK: - Formatter Maps
186-
187-
public lazy var attributeFormattersMap: [String: AttributeFormatter] = {
188-
return [:]
189-
}()
190-
191-
public let styleToFormattersMap: [String: (AttributeFormatter, (String)->Any?)] = [
192-
"color": (ColorFormatter(), {(value) in return UIColor(hexString: value)}),
193-
"text-decoration": (UnderlineFormatter(), { (value) in return value == "underline" ? NSUnderlineStyle.single.rawValue : nil})
194-
]
195-
196-
func parseStyle(style: String) -> [String: String] {
197-
var stylesDictionary = [String: String]()
198-
let styleAttributes = style.components(separatedBy: ";")
199-
for sytleAttribute in styleAttributes {
200-
let keyValue = sytleAttribute.components(separatedBy: ":")
201-
guard keyValue.count == 2,
202-
let key = keyValue.first?.trimmingCharacters(in: CharacterSet.whitespaces),
203-
let value = keyValue.last?.trimmingCharacters(in: CharacterSet.whitespaces) else {
204-
continue
205-
}
206-
stylesDictionary[key] = value
207-
}
208-
return stylesDictionary
209-
}
210184
}
211185

212186
private extension AttributedStringSerializer {

0 commit comments

Comments
 (0)