I really hoped that XHTML would win out. Have you ever looked at the HTML5 parsing rules? They codify acceptance of malformed comments and specify standard handling of bad HTML. There are pages of special cases needed just to build a tree from the tags. Check out Python's "html5parser" for the amount of effort required per input character to make this work.
At least in XHTML, the tags balance.