Skip to content

Conversation

tony19
Copy link
Owner

@tony19 tony19 commented Oct 15, 2022

Matcher.hitEnd() does not actually work as expected. Stepping through shows that the underlying property never gets set, so we can't reliably use this to exit the loop in Matcher.namedGroups().

This PR replaces hitEnd() with a check of the last match's index. If the last index is repeated, we've hit the end.

related #17
fix #26

@tony19 tony19 self-assigned this Oct 15, 2022
@tony19 tony19 merged commit 7506b68 into main Oct 15, 2022
@tony19 tony19 deleted the fix/named-groups-reset branch October 15, 2022 02:20
@tony19 tony19 added this to the 0.2.8 milestone Oct 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Broken backward compatibility of namedGroups() method

1 participant