From 35dcda9e8bfb1e7293232b6373c53d3dbef60e35 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Wed, 8 Jun 2011 21:52:10 +0000 Subject: [PATCH] fix case insensitivity of command-line filter patterns --- hledger-lib/Hledger/Data/Journal.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hledger-lib/Hledger/Data/Journal.hs b/hledger-lib/Hledger/Data/Journal.hs index 717df00a1..52053c8ac 100644 --- a/hledger-lib/Hledger/Data/Journal.hs +++ b/hledger-lib/Hledger/Data/Journal.hs @@ -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 positivepmatch p = any (`amatch` a) positives 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 -- | Keep only postings which affect accounts matched by the account patterns. @@ -371,7 +371,7 @@ matchpats pats str = where (negatives,positives) = partition isnegativepat pats match "" = True - match pat = regexMatches (abspat pat) str + match pat = regexMatchesCI (abspat pat) str negateprefix = "not:"