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

LibWeb: Emit comment token for unterminated bogus comments on EOF #3158

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tcl3
Copy link
Member

@tcl3 tcl3 commented Jan 6, 2025

This fixes the 1 remaining failing subtest in http://wpt.live/html/syntax/parsing/html5lib_comments01.html

Comment on lines +490 to +491
m_current_token.set_comment(consume_current_builder());
EMIT_CURRENT_TOKEN_FOLLOWED_BY_EOF;
Copy link
Member Author

@tcl3 tcl3 Jan 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The spec text here says:

Emit the comment. Emit an end-of-file token.

The spec text for the comment start dash state, says:

This is an eof-in-comment parse error. Emit the current comment token. Emit an end-of-file token.

This PR makes these 2 states behave the same way. Should there be a difference in behavior here? I'm not familiar enough with the spec language to know for sure.

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 this pull request may close these issues.

1 participant