package
(eventually) spec-compliant html 5 parser
npm install high5GitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
Estimated unpacked size across 2 packages.
320.0 kB
Includes dependencies.
Latest published Mar 7, 2015
#high5
(eventually) spec-compliant html5 parser
###Goals
My previous HTML parser, htmlparser2, reached a point where a clean cut was needed. high5 is this cut, even though it's based on htmlparser2 and will try to be backwards compatible (I even tried to preserve the git history, so all previous committers are still credited).
Some of the things that will be supported:
doctypes were treated as processing instructions & not parsed at all.xmlMode option will still be available & conditionally switch these features on.htmlparser2 is always in fragment mode, meaning that eg. the empty document ("") will result in an empty DOM.)htmlparser2 only checks the top element of the stack for the latter.)<table><a>foo</a>… should be handled as <a>foo</a><table>…).###State
* The tokenizer takes several shortcuts, which greatly increase the speed of a JavaScript implementation, but disobay the spec implementation-wise. The output should be spec-compliant, though.