Skip to content

Parser improperly handles optional tags under html5 rules #169

@tysonzero

Description

@tysonzero

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions