Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plump doesn't handle self closing tags #50

Open
aadcg opened this issue Jan 19, 2023 · 3 comments
Open

plump doesn't handle self closing tags #50

aadcg opened this issue Jan 19, 2023 · 3 comments

Comments

@aadcg
Copy link

aadcg commented Jan 19, 2023

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
Copy link
Owner

Plump specifically does not adhere to the HTML5 specification on such ambiguous cases.

@aartaka
Copy link

aartaka commented Jan 19, 2023

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
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants