mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 04:28:13 +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;
|
||||
}
|
||||
|
||||
if (match('\\', '/') || match('\\', '[') || (m_regex_is_in_character_class && match('\\', ']')))
|
||||
if (match('\\', '/') || match('\\', '[') || match('\\', '\\') || (m_regex_is_in_character_class && match('\\', ']')))
|
||||
consume();
|
||||
consume();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue