Permalink
Browse files

fix multi ignore line issue

  • Loading branch information...
1 parent 6efa537 commit 4d6ede13f06d9c86f5b3c3d0beb9ab640ac68313 @mafintosh committed Jul 23, 2014
Showing with 9 additions and 1 deletion.
  1. +1 −1 index.js
  2. +8 −0 test.js
View
@@ -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)
}
})
}
View
@@ -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.