Parser improperly handles optional tags under html5 rules
tysonzero opened this issue · 0 comments
tysonzero commented
https://html.spec.whatwg.org/multipage/syntax.html#optional-tags
Minimal incorrect example:
renderMarkup . toMarkup $ parseLT "<td>foo<td>bar"
It currently gives:
"<!DOCTYPE HTML>\n<td>foo<td>bar</td></td>"
But it should give one of:
"<!DOCTYPE HTML>\n<td>foo</td><td>bar</td>"
"<!DOCTYPE HTML>\n<td>foo<td>bar"
If html4 / xhtml5 parsing is also desired then separate functions/modules may be needed.