1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:07:35 +00:00

LibRegex: Implement ECMA262 multiline matching without splitting lines

As ECMA262 regex allows `[^]` and literal newlines to match newlines in
the input string, we shouldn't split the input string into lines, rather
simply make boundaries and catchall patterns capable of checking for
these conditions specifically.
This commit is contained in:
Ali Mohammad Pur 2022-01-25 13:30:27 +03:30 committed by Ali Mohammad Pur
parent 98183ef572
commit 5fac41f733
7 changed files with 55 additions and 20 deletions

View file

@ -194,7 +194,8 @@ Parser::Result Parser::parse(Optional<AllOptions> regex_options)
move(m_parser_state.match_length_minimum),
move(m_parser_state.error),
move(m_parser_state.error_token),
m_parser_state.named_capture_groups.keys()
m_parser_state.named_capture_groups.keys(),
m_parser_state.regex_options,
};
}