Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix multi ignore line issue

  • Loading branch information...
commit 4d6ede13f06d9c86f5b3c3d0beb9ab640ac68313 1 parent 6efa537
@mafintosh authored
Showing with 9 additions and 1 deletion.
  1. +1 −1  index.js
  2. +8 −0 test.js
View
2  index.js
@@ -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
8 test.js
@@ -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()
})
Please sign in to comment.
Something went wrong with that request. Please try again.