Skip to content

Commit

Permalink
LibWeb: Fix 'Comment end state' in HTML Tokenizer
Browse files Browse the repository at this point in the history
Also, update the expected hash in the LibWeb TestHTMLTokenizer
regression test.

This is due to the "This comment has a few too many dashes." comment
token being updated.
  • Loading branch information
ant1441 authored and awesomekling committed Feb 21, 2022
1 parent d73bb26 commit b6eaefa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Tests/LibWeb/TestHTMLTokenizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,5 +206,5 @@ TEST_CASE(regression)
auto file_contents = file.value()->read_all();
auto tokens = run_tokenizer(file_contents);
u32 hash = hash_tokens(tokens);
EXPECT_EQ(hash, 3215459107u);
EXPECT_EQ(hash, 710375345u);
}
2 changes: 1 addition & 1 deletion Userland/Libraries/LibWeb/HTML/Parser/HTMLTokenizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1483,7 +1483,7 @@ Optional<HTMLToken> HTMLTokenizer::next_token()
}
ANYTHING_ELSE
{
m_current_builder.append('-');
m_current_builder.append("--");
RECONSUME_IN(Comment);
}
}
Expand Down

0 comments on commit b6eaefa

Please sign in to comment.