mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 13:49:16 +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
Notes:
sideshowbarker
2024-07-17 20:13:41 +09:00
Author: https://github.com/alimpfard
Commit: 5fac41f733
Pull-request: https://github.com/SerenityOS/serenity/pull/12126
Reviewed-by: https://github.com/linusg ✅
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