File tree 2 files changed +5
-1
lines changed 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change 7
7
8
8
var isExtglob = require ( 'is-extglob' ) ;
9
9
var chars = { '{' : '}' , '(' : ')' , '[' : ']' } ;
10
- var strictRegex = / \\ ( .) | ( ^ ! | \* | [ \] . + ) ] \? | \[ [ ^ \\ \] ] + \] | \{ [ ^ \\ } ] + \} | \( \? [: ! = ] [ ^ \\ ) ] + \) | \( [ ^ | ] + \| [ ^ \\ ) ] + \) ) / ;
10
+ var strictRegex = / \\ ( .) | ( ^ ! | \* | \? | [ \] . + ) ] \? | \[ [ ^ \\ \] ] + \] | \{ [ ^ \\ } ] + \} | \( \? [: ! = ] [ ^ \\ ) ] + \) | \( [ ^ | ] + \| [ ^ \\ ) ] + \) ) / ;
11
11
var relaxedRegex = / \\ ( .) | ( ^ ! | [ * ? { } ( ) [ \] ] | \( \? ) / ;
12
12
13
13
module . exports = function isGlob ( str , options ) {
Original file line number Diff line number Diff line change @@ -19,6 +19,10 @@ describe('isGlob', function() {
19
19
assert ( isGlob ( '!*.js' ) ) ;
20
20
assert ( isGlob ( '!foo' ) ) ;
21
21
assert ( isGlob ( '!foo.js' ) ) ;
22
+ assert ( isGlob ( 'foo?' ) ) ;
23
+ assert ( isGlob ( 'foo?.js' ) ) ;
24
+ assert ( isGlob ( 'bar?/foo.js' ) ) ;
25
+ assert ( isGlob ( 'bar?/foo?.js' ) ) ;
22
26
assert ( isGlob ( '**/abc.js' ) ) ;
23
27
assert ( isGlob ( 'abc/*.js' ) ) ;
24
28
assert ( isGlob ( '@.(?:abc)' ) ) ;
You can’t perform that action at this time.
0 commit comments