Skip to content

Commit

Permalink
fix multi ignore line issue
Browse files Browse the repository at this point in the history
  • Loading branch information
mafintosh committed Jul 23, 2014
1 parent 6efa537 commit 4d6ede1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ ignore.compile = function(src) {
})
.reduce(function(a, b) {
return function(filename) {
return a.match(filename) || b.match(filename)
return a(filename) || b(filename)
}
})
}
Expand Down
8 changes: 8 additions & 0 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,12 @@ tape('default value', function(t) {
t.ok(filter('node_modules'))
t.notOk(filter('meh'))
t.end()
})

tape('compile multiple lines', function(t) {
var filter = ignore.compile('a\nb\nc')
t.ok(filter('a'))
t.ok(filter('b'))
t.notOk(filter('d'))
t.end()
})

0 comments on commit 4d6ede1

Please sign in to comment.