mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 12:48:11 +00:00
LibJS: Properly consume escaped backslash in regex literal
This commit is contained in:
parent
492df51e70
commit
cc7462daeb
1 changed files with 1 additions and 1 deletions
|
@ -485,7 +485,7 @@ Token Lexer::next()
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (match('\\', '/') || match('\\', '[') || (m_regex_is_in_character_class && match('\\', ']')))
|
if (match('\\', '/') || match('\\', '[') || match('\\', '\\') || (m_regex_is_in_character_class && match('\\', ']')))
|
||||||
consume();
|
consume();
|
||||||
consume();
|
consume();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue