From 5792e9169b4b4ad08429e428187c895c57d7eb7a Mon Sep 17 00:00:00 2001 From: Louis-Guillaume Gagnon Date: Thu, 5 Sep 2013 16:34:02 -0400 Subject: [PATCH] Search: don't print newline for non-matching entries --- TODO | 3 --- src/Search.hs | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/TODO b/TODO index 758cd0a..912456e 100644 --- a/TODO +++ b/TODO @@ -1,6 +1,3 @@ -==> search.hs: -* currently prints a newline on discarded entries, fix this. - ==> View.hs: * viewer is hardwired in program; change that --> config file? diff --git a/src/Search.hs b/src/Search.hs index b59daeb..3abc1e7 100644 --- a/src/Search.hs +++ b/src/Search.hs @@ -55,7 +55,7 @@ search xs = do let ps = getValues "Pages" multi entries <- searchEntries single let entries' = filtA as $ filtK ks $ filtP ps entries - putStr $ concat $ intersperse "\n" $ map rowToString entries' + putStr $ concat $ intersperse "\n" $ filter (/="") $ map rowToString entries' usageSearch :: String usageSearch = "usage: " ++ progName ++ " search \n\ -- 2.11.4.GIT