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

Correctly put terminals into non-capturing groups when combining them #1415

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

Conversation

MegaIng
Copy link
Member

@MegaIng MegaIng commented May 16, 2024

Fix #1414

The core issue is that A B got turned into /{A}{B}/ instead of /(?:{A})(?:{B})/. Most of the time, this doesn't matter, however if B is a manually defined regex, for example /c|d/, the overall regex ended up being /ac|d/, which ofcourse means something else than the BNF was supposed to express.

This is technically a breaking change if people were relying on this buggy behavior.

@erezsh
Copy link
Member

erezsh commented May 16, 2024

Good change. But I have a feeling this might trigger some hidden bugs in various repos.

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.

Pipe in terminal regex not working as expected
2 participants