mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:27:43 +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:
parent
98183ef572
commit
5fac41f733
7 changed files with 55 additions and 20 deletions
|
@ -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,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue