mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
LibJS: Properly consume escaped backslash in regex literal
This commit is contained in:
parent
492df51e70
commit
cc7462daeb
Notes:
sideshowbarker
2024-07-19 05:45:50 +09:00
Author: https://github.com/mattco98 Commit: https://github.com/SerenityOS/serenity/commit/cc7462daeb8 Pull-request: https://github.com/SerenityOS/serenity/pull/2527
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…
Reference in a new issue