Swiftpack.co - Package - michaelnisi/hattr

Build Status Code Coverage

hattr - parse HTML

The hattr package provides a simple HTML parser to efficiently transform HTML into attributed strings for iOS.

Goals

  • No dependencies, except for UIKit
  • Offloadable from main thread
  • 😘

Example

import HTMLAttributor

// html is an HTML String

let hattr = HTMLAttributor()
let tree = try! hattr.parse(html)
let attributedText = try! hattr.attributedString(tree)

Find a runnable example in HTMLPlayground.playground.

License

MIT License

Github

link
Stars: 1
Help us keep the lights on

Dependencies

Used By

Total: 0