-
-
Notifications
You must be signed in to change notification settings - Fork 55
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
globstar option has no affect for patterns without prefix #20
Comments
Most likely this is related to parse.fastpaths = (input, options) => {
// …
const globstar = (opts) => {
return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
};
// …
} |
thanks for the debugging. Did you try disabling fastpaths to see if it works? I think I forgot about that rule when I added support for fastpaths. A fix should be pretty easy if that is indeed what's causing the issue. |
Yeap, works correctly with a: /^(?:(?:(?:(?!(?:^|[\\\/])\.).)*?))$/
b: /^(?:(?!\.)[^\\\/]*?[\\\/]?)$/
c: /^(?:a(?:[\\\/](?!\.)(?:(?:(?!(?:^|[\\\/])\.).)*?)|$))$/
d: /^(?:a[\\\/](?!\.)[^\\\/]*?[\\\/]?)$/ |
great, thanks for checking! I'll get a fix pushed up asap |
Thanks 🎉 Don't worry, it's not urgent :) |
Environment
Actual behaviour
RegExp's:
Expected behaviour
For case
b
andd
, I expectfalse
based on theglobstar
option description andbash shopt -s globstar
.The text was updated successfully, but these errors were encountered: