- Update to Swift 5 (no actual source changes).
- Fixes crashing on strings like
<blah></blah>
with dynamic attributes.
Update to Swift 4.2.
Update to Swift 4.
Update to Swift 3.
Swift support! You will need to add the ZSWTaggedString/Swift
dependency for this. This provides a cleaner API for setting attributes for tags, for example:
options["a"] = .Static([
NSForegroundColorAttributeName: UIColor.whiteColor()
])
options["b"] = .Dynamic({ tagName, tagAttributes, existingAttributes in
if tagAttributes["white"] != nil {
return [
NSForegroundColorAttributeName: UIColor.whiteColor()
]
} else {
return [
NSForegroundColorAttributeName: UIColor.redColor()
]
}
})
This release also fixes ZSWTaggedString
initialization methods init(string:)
and init(format:...)
under Swift.
Incompatibility notes:
ZSWTaggedString
no longer acceptsnil
input; it will convert anynil
input into@""
.ZSWTaggedStringOptions.returnEmptyStringForNil
flag has been removed.
Fix some cases where escaped strings (e.g. containing <) were not correctly including the start <
.
Initial release