(eventually) spec-compliant html5 parser
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.
- Several token types that were previously handled as processing instruction tokens are handled as (bogus) comments in the HTML5 spec.
xmlModeoption will still be available & conditionally switch these features on.
- Add a document mode. (
htmlparser2is always in fragment mode, meaning that eg. the empty document (
"") will result in an empty DOM.)
- Implicit opening & closing tags. (
htmlparser2only checks the top element of the stack for the latter.)
- Foster parenting (eg.
<table><a>foo</a>…should be handled as
- (Potentially) handle character encodings (?).
- Spec-compliant* tokenizer
- Rudimentary tag-handling (still a long way to go, only marginally better than htmlparser2).