Skip to content

Commit

Permalink
fix: set negatedExtGlob also if it does not span the whole pattern
Browse files Browse the repository at this point in the history
This way micromatch can detect that this is a negation pattern.
  • Loading branch information
danez committed Apr 9, 2021
1 parent 4a510d7 commit 2899e96
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/parse.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ const parse = (input, options) => {
output = token.close = `)$))${extglobStar}`;
}

if (token.prev.type === 'bos' && eos()) {
if (token.prev.type === 'bos') {
state.negatedExtglob = true;
}
}
Expand Down

0 comments on commit 2899e96

Please sign in to comment.