Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix matching with multiple name matchers. #44

Merged
merged 1 commit into from
May 20, 2024

Conversation

ltratt
Copy link
Member

@ltratt ltratt commented May 19, 2024

This was very subtly wrong before, and could skip input and names, causing incorrect strings to match (see the new tests for what didn't work properly before).

The fix in this commit slows intra-line matching down considerably, as we now check each character individually when name matchers are used. If this turns out to be an actual bottleneck, this can be optimised.

This was very subtly wrong before, and could skip input and names,
causing incorrect strings to match (see the new tests for what didn't
work properly before).

The fix in this commit slows intra-line matching down considerably, as
we now check each character individually when name matchers are used. If
this turns out to be an actual bottleneck, this can be optimised.
@ltratt ltratt marked this pull request as ready for review May 19, 2024 09:13
@vext01
Copy link
Member

vext01 commented May 20, 2024

Can you elaborate on what was wrong before? The new tests look good to me, but I'm uncertain what was causing the issue.

@ltratt
Copy link
Member Author

ltratt commented May 20, 2024

When I added multiple name matching, I made a mistake when a "later" name matcher matched "earlier" in the text. In practise, this meant that some parts of some input were ignored. The new tests failed before but pass with this PR.

@vext01 vext01 added this pull request to the merge queue May 20, 2024
Merged via the queue into softdevteam:master with commit 52fc129 May 20, 2024
2 checks passed
@ltratt ltratt deleted the fix_multiple_name_matchers branch May 20, 2024 09:17
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.

2 participants