mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-31 21:59:21 +00:00
LibWeb: Fix assertion failure when tokenizing JS regex literals
This fixes parsing the following regular expression: /</g; It also adds a simple script element to the HTMLTokenizer regression test, which also contains that specific regex.
This commit is contained in:
committed by
Andreas Kling
parent
c82c652ee4
commit
2404ad6897
@@ -193,5 +193,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, 2891738465u);
|
||||
EXPECT_EQ(hash, 2203864459u);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user