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

The glob string */*/** fails to match a lot of things #70

Closed
callumlocke opened this issue Jul 15, 2016 · 2 comments · Fixed by tunnckoCore/filter-css-properties#4
Closed

Comments

@callumlocke
Copy link

const micromatch = require('micromatch');

// create a matcher that should return true for any
// file that's inside at least two nested directories...
const match = micromatch.matcher('*/*/**');

// it's correct for these paths:
match('a/b.txt'); // false
match('a/b/c.txt'); // true

// but it stops matching if you add more levels, despite double-star:
match('a/b/c/d.txt'); // false (expected true)
match('a/b/c/d/e.txt'); // false (expected true)

Live demo of this bug on Tonic

@jonschlinkert
Copy link
Member

I'll take a look, I suspect this is because consecutive */*/ patterns are collapsed (and they shouldn't be)

@jonschlinkert
Copy link
Member

Let me know if you have any more issues. thanks for reporting the bug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants