LibJS: Properly consume escaped backslash in regex literal

This commit is contained in:
Matthew Olsson 2020-06-07 19:21:27 -07:00 committed by Andreas Kling
parent 492df51e70
commit cc7462daeb
Notes: sideshowbarker 2024-07-19 05:45:50 +09:00

View file

@ -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();
}