A clone of https://code.google.com/p/html5lib/