Skip to content

arjunpa/hattr

 
 

Repository files navigation

Build Status Code Coverage

hattr - parse HTML

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

Goals

  • No dependencies
  • Offloadable from main thread
  • Keeping it simple

Example

import HTMLAttributor

// html is a string of HTML

let worker = HTMLAttributor()
let tree = try! worker.parse(html)
let text = try! worker.attributedString(tree)

Find a runnable example in HTMLPlayground.playground.

License

MIT License

About

Attribute string from HTML

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Swift 97.4%
  • Makefile 2.6%