Skip to content

Commit

Permalink
Clear stateChar before pipe in extglob
Browse files Browse the repository at this point in the history
  • Loading branch information
maxg committed Dec 16, 2013
1 parent 45e3087 commit 3a68cf2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions minimatch.js
Original file line number Diff line number Diff line change
Expand Up @@ -618,6 +618,7 @@ function parse (pattern, isSub) {
continue
}

clearStateChar()
re += "|"
continue

Expand Down
1 change: 1 addition & 0 deletions test/extglob-ending-with-state-char.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ var minimatch = require('../')

test('extglob ending with statechar', function(t) {
t.notOk(minimatch('ax', 'a?(b*)'))
t.ok(minimatch('ax', '?(a*|b)'))
t.end()
})

0 comments on commit 3a68cf2

Please sign in to comment.