fix case insensitivity of command-line filter patterns
This commit is contained in:
parent
45b3a07ea7
commit
35dcda9e8b
@ -238,7 +238,7 @@ filterJournalTransactionsByAccount apats j@Journal{jtxns=ts} = j{jtxns=filter tm
|
|||||||
tmatch t = (null positives || any positivepmatch ps) && (null negatives || not (any negativepmatch ps)) where ps = tpostings t
|
tmatch t = (null positives || any positivepmatch ps) && (null negatives || not (any negativepmatch ps)) where ps = tpostings t
|
||||||
positivepmatch p = any (`amatch` a) positives where a = paccount p
|
positivepmatch p = any (`amatch` a) positives where a = paccount p
|
||||||
negativepmatch p = any (`amatch` a) negatives where a = paccount p
|
negativepmatch p = any (`amatch` a) negatives where a = paccount p
|
||||||
amatch pat a = regexMatches (abspat pat) a
|
amatch pat a = regexMatchesCI (abspat pat) a
|
||||||
(negatives,positives) = partition isnegativepat apats
|
(negatives,positives) = partition isnegativepat apats
|
||||||
|
|
||||||
-- | Keep only postings which affect accounts matched by the account patterns.
|
-- | Keep only postings which affect accounts matched by the account patterns.
|
||||||
@ -371,7 +371,7 @@ matchpats pats str =
|
|||||||
where
|
where
|
||||||
(negatives,positives) = partition isnegativepat pats
|
(negatives,positives) = partition isnegativepat pats
|
||||||
match "" = True
|
match "" = True
|
||||||
match pat = regexMatches (abspat pat) str
|
match pat = regexMatchesCI (abspat pat) str
|
||||||
|
|
||||||
negateprefix = "not:"
|
negateprefix = "not:"
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user