`plump` doesn't handle self closing tags
aadcg opened this issue · 3 comments
aadcg commented
Example:
PLUMP> (children (parse "<p>one <p>two"))
#(#<ELEMENT p {100955CA83}>)
PLUMP> (children (parse "<p>one</p> <p>two</p>"))
#(#<ELEMENT p {100955CBC3}> #<TEXT-NODE {100955CC23}> #<ELEMENT p {100955CC63}>)
I'm wondering if supporting self closing tags is a non-goal of the project. Thanks.
Shinmera commented
Plump specifically does not adhere to the HTML5 specification on such ambiguous cases.
aartaka commented
But those cases are not ambiguous, they are pretty well-documented and restricted: https://html.spec.whatwg.org/multipage/parsing.html#closing-elements-that-have-implied-end-tags
Am I misenterpreting something?
Shinmera commented
Let's put it this way: they are ambiguous until the end of the document or another context block is parsed that then forces backtracking and reparsing. I'm personally not really interested in these cases, but if someone else does the work, I'll merge it, why not.