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

'Or' functionality broken (using |) #224

Open
FingalP opened this issue Nov 5, 2021 · 0 comments
Open

'Or' functionality broken (using |) #224

FingalP opened this issue Nov 5, 2021 · 0 comments

Comments

@FingalP
Copy link

FingalP commented Nov 5, 2021

(Thanks for reporting an issue to micromatch! If you haven't already read the contributor guidelines, Please do that now, then proceed to fill out the details below.)

Please describe the minimum necessary steps to reproduce this issue:

npm i micromatch@3
> micromatch = require('micromatch')
> micromatch(['foo'], 'foo|bar')
[ 'foo' ]
npm i micromatch@4
> micromatch = require('micromatch')
> micromatch(['foo'], 'foo|bar')
[]

What is happening that shouldn't be? / What should be happening instead?

We should be seeing a match (['foo']) when using version 4, just like we do with version 3.


Interestingly it works on both versions with round brackets around each option, e.g.:

micromatch(['foo'], '(foo)|(bar)')

However, we need it to work without the brackets.

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

No branches or pull requests

1 participant