don't fail when matching an empty pattern, as in "not:"
This commit is contained in:
parent
8eb31bc5e3
commit
ef39cced4a
@ -145,4 +145,4 @@ isnegativepat pat = negateprefix `isPrefixOf` pat
|
||||
abspat pat = if isnegativepat pat then drop (length negateprefix) pat else pat
|
||||
positivepats = filter (not . isnegativepat)
|
||||
negativepats = filter isnegativepat
|
||||
matchregex pat str = containsRegex (mkRegexWithOpts pat True False) str
|
||||
matchregex pat str = null pat || containsRegex (mkRegexWithOpts pat True False) str
|
||||
|
||||
Loading…
Reference in New Issue
Block a user