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

Number of parse errors for <!doctype html><math></html> #138

Open
JKingweb opened this issue Oct 10, 2021 · 2 comments
Open

Number of parse errors for <!doctype html><math></html> #138

JKingweb opened this issue Oct 10, 2021 · 2 comments

Comments

@JKingweb
Copy link

Line 1044 of tests19.dat in the tree construction tests lists three parse errors:

#data
<!doctype html><math></html>
#errors
(1,28): unexpected-end-tag
(1,28): expected-one-end-tag-but-got-another
(1,28): unexpected-end-tag

I have only been able to identify two of them, the first in foreign content parsing:

If node's tag name, converted to ASCII lowercase, is not the same as the tag name of the token, then this is a parse error.

And the second in the "in body" insertion mode:

Otherwise, if there is a node in the stack of open elements that is not either a dd element, a dt element, ..., or the html element, then this is a parse error.

After that the "after body" insertion mode only emits a parse error during fragment parsing (which this is not).

The test would seem to be in error. Is my assessment correct?

@alexander-akait
Copy link
Contributor

alexander-akait commented May 23, 2022

@fb55 sorry for ping, have the same problem, only 2 errors:

[
Error { inner: (Span { lo: BytePos(22), hi: BytePos(29), ctxt: #0 }, EndTagDidNotMatchCurrentOpenElement(Atom('html' type=inline), Atom('math' type=inline))) }, 
Error { inner: (Span { lo: BytePos(22), hi: BytePos(29), ctxt: #0 }, EndTagWithUnclosedElements(Atom('html' type=inline))) }
]

Maybe typo when we merge it like we fixed it here 6030cb6?

@fb55
Copy link
Contributor

fb55 commented May 23, 2022

@alexander-akait You should probably just open a PR with how you'd expect this to look, and one of the maintainers (which I am not) might merge it. That has worked for me in #146.

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

No branches or pull requests

3 participants