Skip to content

Commit

Permalink
LibWeb: Emit comment token for unterminated bogus comments on EOF
Browse files Browse the repository at this point in the history
  • Loading branch information
tcl3 authored and pbrw committed Jan 14, 2025
1 parent bf46608 commit e79768e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Libraries/LibWeb/HTML/Parser/HTMLTokenizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -488,8 +488,8 @@ Optional<HTMLToken> HTMLTokenizer::next_token(StopAtInsertionPoint stop_at_inser
}
ON_EOF
{
m_queued_tokens.enqueue(move(m_current_token));
EMIT_EOF;
m_current_token.set_comment(consume_current_builder());
EMIT_CURRENT_TOKEN_FOLLOWED_BY_EOF;
}
ON(0)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ Harness status: OK

Found 16 tests

15 Pass
1 Fail
16 Pass
Pass html5lib_comments01.html 3dbda8330033c3fbf3185a55e963075328099578
Pass html5lib_comments01.html 7476098e9823b3deee1857739daf719ff18e37b4
Pass html5lib_comments01.html eca7f97a4659eab6da4127c225420f1664b6c0c4
Expand All @@ -17,6 +16,6 @@ Pass html5lib_comments01.html 8b36d140a4a223b083a8d41af7c98a1c20377856
Pass html5lib_comments01.html 1894e23c5ee89d6f4b5f1dbe9b681b42863b4d1f
Pass html5lib_comments01.html 2cefeae994b6b0be0accbfff4757fef40ed914eb
Pass html5lib_comments01.html ac9fd94008255e73cba953dbd374cb41703f5446
Fail html5lib_comments01.html 617815b6a683613fcb6b9cd5841b2ea7428d838d
Pass html5lib_comments01.html 617815b6a683613fcb6b9cd5841b2ea7428d838d
Pass html5lib_comments01.html bb8faf75d2e28aee13ec4a0d8eab00b4d7475763
Pass html5lib_comments01.html 89c4ae1ae34df9dff0e516afdef87cd169c3e6a5

0 comments on commit e79768e

Please sign in to comment.