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

[BUG?] possible issues in internal/re.js #307

Open
pygy opened this issue Dec 31, 2019 · 1 comment
Open

[BUG?] possible issues in internal/re.js #307

pygy opened this issue Dec 31, 2019 · 1 comment
Labels
Bug thing that needs fixing

Comments

@pygy
Copy link

pygy commented Dec 31, 2019

What / Why

I've been porting internal/re.js to compose-regexp, for personal use as a vendored-in dep, because raw regexp concatenation hurts my eyes, and I've found a couple of things that strike me as possible bugs, around L73-L87... namely:

  • BUILD is supposed not to capture according to the comment, but it does capture its content.
  • the v? prefix in FULLPLAIN is different from those in LOOSEPLAIN and XRANGEPLAIN(LOOSE)? ([v=\\s]*).

Who

@isaacs
Copy link
Contributor

isaacs commented Dec 31, 2019

BUILD is supposed not to capture according to the comment, but it does capture its content.

Ah, yes, that is an outdated and incorrect comment.

the v? prefix in FULLPLAIN is different from those in LOOSEPLAIN and XRANGEPLAIN(LOOSE)? ([v=\s]*).

I think that's because v1.2.3 or =1.2.3 is a valid version in loose mode but not in strict mode. But v1.x is always a valid range, loose or not.

@darcyclarke darcyclarke added the Bug thing that needs fixing label Jul 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing
Projects
None yet
Development

No branches or pull requests

3 participants