Note install
The hattr iOS package provides a naïve HTML parser to efficiently transform HTML into attributed strings.
50X faster than NSAttributedString.init(data:options:documentAttributes:)
NSAttributedString.init(data:options:documentAttributes:)
At least 50X less correct.
import HTMLAttributor let hattr = HTMLAttributor() let tree = try! hattr.parse(html) let attributedText = try! hattr.attributedString(tree)
Find a runnable example in HTMLPlayground.playground.
HTMLPlayground.playground
📦 Add https://github.com/michaelnisi/hattr to your package dependencies.
https://github.com/michaelnisi/hattr
MIT License
©Copyright 2023 CCF 开源发展委员会 Powered by Trustie& IntelliDE 京ICP备13000930号
hattr - parse HTML
The hattr iOS package provides a naïve HTML parser to efficiently transform HTML into attributed strings.
Goals
At least 50X less correct.
Example
Find a runnable example in
HTMLPlayground.playground
.Install
📦 Add
https://github.com/michaelnisi/hattr
to your package dependencies.License
MIT License