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

Regex to detect flags can be improved #2

Open
kovidgoyal opened this issue Aug 13, 2022 · 0 comments · May be fixed by #7
Open

Regex to detect flags can be improved #2

kovidgoyal opened this issue Aug 13, 2022 · 0 comments · May be fixed by #7

Comments

@kovidgoyal
Copy link

Currently the regex is (--?\S+) this will incorrectly match words like if-available. Changing it to \s+(--?\S+) will prevent that. Although the ideal solution is to of course iterate over all flags and build up a regex from that list.

@gabe565 gabe565 linked a pull request Aug 7, 2024 that will close this issue
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 a pull request may close this issue.

1 participant