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: improve literal extraction from certain repetitions #1033

Merged
merged 2 commits into from
Jul 11, 2023

Conversation

plusvic
Copy link
Contributor

@plusvic plusvic commented Jul 10, 2023

When repetitions didn't have an explicit max value, like in (ab){2,} the literal extractor was producing sub-optimal literals, like "ab" instead of "abab".

Close #1032

When repetitions didn't have an explicit max value, like in `(ab){2,}` the literal extractor was producing sub-optimal literals, like `"ab"` instead of `"abab"`.

Close rust-lang#1032
Copy link
Member

@BurntSushi BurntSushi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect, thanks!

@BurntSushi BurntSushi merged commit 43ba6b8 into rust-lang:master Jul 11, 2023
15 checks passed
@BurntSushi
Copy link
Member

This PR is in regex-syntax 0.7.4 on crates.io. Thanks again!

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.

hir::literal::Extractor not producing optimal literals in some cases
2 participants