mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 07:17:35 +00:00
LibRegex: Preserve capture groups and matches across ForkReplace
This makes the (flawed) ForkStay inserted as a loop header unnecessary, and finally fixes LibRegex rewriting weird loops in weird ways.
This commit is contained in:
parent
bc20e4f71d
commit
cd83325c7c
2 changed files with 2 additions and 10 deletions
|
@ -449,6 +449,8 @@ Optional<bool> Matcher<Parser>::execute(MatchInput const& input, MatchState& sta
|
|||
(*it) = state;
|
||||
it->instruction_position = state.fork_at_position;
|
||||
it->initiating_fork = *input.fork_to_replace;
|
||||
it->capture_group_matches = state.capture_group_matches;
|
||||
it->matches = state.matches;
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue