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

Replace regex which allows dubble hyphens by one that does not. #1491

Merged
merged 1 commit into from
Jan 27, 2024

Conversation

Darsstar
Copy link
Contributor

@Darsstar Darsstar commented Jan 26, 2024

The current version disallows tripple hyphens but allows dubble hyphens. (It also seems overcomplicated)

Alternatively we can make it a negative lookbehind instead of a negative lookahead, but the complexity is much higher.

See https://regex101.com/r/Xyu0bt/1 for proof the current version matches double hyphens


📚 Documentation preview 📚: https://python-packaging-user-guide--1491.org.readthedocs.build/en/1491/

The current version disallows tripple hyphens but allows dubble hyphens. (It also seems overcomplicated)

Alternatively we can make it a negative lookbehind instead of a negative lookahead, but the complexity is much higher.

See https://regex101.com/r/Xyu0bt/1 for proof the current version matches double hyphens
@chrysle
Copy link
Contributor

chrysle commented Jan 26, 2024

LGTM. @brettcannon you made the last change to this regex in #1076. Do you agree with this?

@brettcannon
Copy link
Member

Yep, the change seems to work!

@chrysle chrysle added this pull request to the merge queue Jan 27, 2024
Merged via the queue into pypa:main with commit c8f51ab Jan 27, 2024
6 checks passed
@chrysle
Copy link
Contributor

chrysle commented Jan 27, 2024

Thanks!

@Darsstar Darsstar deleted the patch-1 branch February 5, 2024 11:03
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.

4 participants