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

Check for complete pattern matches later in the target text #1900

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

iteratee
Copy link
Contributor

This allows us to find the best match when trying to match "so" against "schemas/source_files.ex". Without this, bescause the 's' in "so" matches against "schemas", we never find the complete match against "source_files" later in the target. Look for a later total match and add it to the list if it is at least as good as the computed partial match so far. If we also have a partial-match continuation, prefer the longer of the 2 choices, or the single-piece match if they are the same length.

This allows us to find the best match when trying to match "so"
against "schemas/source_files.ex". Without this, bescause the 's' in
"so" matches against "schemas", we never find the complete match against
"source_files" later in the target. Look for a later total match and add
it to the list if it is at least as good as the computed partial match
so far. If we also have a partial-match continuation, prefer the longer
of the 2 choices.
@iguanacucumber iguanacucumber mentioned this pull request Oct 15, 2024
2 tasks
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.

1 participant