Skip to content

Commit

Permalink
fix: unescape exclamation mark (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrmlnc authored and phated committed Jan 27, 2021
1 parent 4aad91d commit a98874f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ var slash = '/';
var backslash = /\\/g;
var enclosure = /[\{\[].*[\/]*.*[\}\]]$/;
var globby = /(^|[^\\])([\{\[]|\([^\)]+$)/;
var escaped = /\\([\*\?\|\[\]\(\)\{\}])/g;
var escaped = /\\([\!\*\?\|\[\]\(\)\{\}])/g;

/**
* @param {string} str
Expand Down
1 change: 1 addition & 0 deletions test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ describe('glob-parent', function() {
assert.equal(gp('[bar]/'), '.');
assert.equal(gp('./\\[bar]'), './[bar]');
assert.equal(gp('\\[bar]/'), '[bar]');
assert.equal(gp('\\!dir/*'), '!dir');
assert.equal(gp('[bar\\]/'), '.');
assert.equal(gp('path/foo \\[bar]/'), 'path/foo [bar]');
assert.equal(gp('path/\\{foo,bar}/'), 'path/{foo,bar}');
Expand Down

0 comments on commit a98874f

Please sign in to comment.