mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-08 02:26:10 +00:00
LibRegex: Ensure nested capture groups have non-conflicting names
Take record of the named capture group prior to parsing the group's body. This requires removal of the recorded minimum length of the named capture group directly, and now needs to be looked up via the group minimu lengths table.
This commit is contained in:
parent
e37c9eaeff
commit
efcaf991e6
Notes:
github-actions[bot]
2024-11-24 09:27:05 +00:00
Author: https://github.com/mjessome 🔰
Commit: efcaf991e6
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2541
Reviewed-by: https://github.com/alimpfard
3 changed files with 12 additions and 10 deletions
|
@ -597,6 +597,7 @@ TEST_CASE(ECMA262_parse)
|
|||
{ "a{9007199254740992,9007199254740992}"sv, regex::Error::InvalidBraceContent },
|
||||
{ "(?<a>a)(?<a>b)"sv, regex::Error::DuplicateNamedCapture },
|
||||
{ "(?<a>a)(?<b>b)(?<a>c)"sv, regex::Error::DuplicateNamedCapture },
|
||||
{ "(?<a>(?<a>a))"sv, regex::Error::DuplicateNamedCapture },
|
||||
{ "(?<1a>a)"sv, regex::Error::InvalidNameForCaptureGroup },
|
||||
{ "(?<\\a>a)"sv, regex::Error::InvalidNameForCaptureGroup },
|
||||
{ "(?<\ta>a)"sv, regex::Error::InvalidNameForCaptureGroup },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue