aboutsummaryrefslogtreecommitdiff
path: root/Print.hs
diff options
context:
space:
mode:
authorRaúl Benencia <rul@kalgan.cc>2013-09-01 11:16:38 -0300
committerRaúl Benencia <rul@kalgan.cc>2013-09-01 11:16:38 -0300
commit39f53d2775f38514a537f03c7b72281ec31a3c0e (patch)
tree42fd07aa22b7ac986b36298b78fe1c9e85ede115 /Print.hs
parent58836f3c2020c634a2a508846140d163572fd5c0 (diff)
Further improving on body scrolling
Diffstat (limited to 'Print.hs')
-rw-r--r--Print.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/Print.hs b/Print.hs
index 1e46c00..8916e55 100644
--- a/Print.hs
+++ b/Print.hs
@@ -20,14 +20,15 @@ nameLen = 20
ppNameAddr nas = intercalate ", " $ map ppNameAddr' nas
where ppNameAddr' na = case nameAddr_name na of
Nothing -> nameAddr_addr na
- Just n -> (decodeField n) ++ " <" ++ nameAddr_addr na ++ ">"
+ Just n -> unquote (decodeField n) ++ " <" ++ nameAddr_addr na ++ ">"
ppIndexNameAddr nas = normalizeLen nameLen $ concat $ map ppNameAddr' nas
where ppNameAddr' na = case nameAddr_name na of
Nothing -> nameAddr_addr na
- Just n -> (decodeField n)
+ Just n -> unquote (decodeField n)
+
+unquote xs= if (head xs == '"' && last xs == '"') then (tail . init) xs else xs
-subjectLen = 90
ppSubject = flat . decodeField
flat xs = intercalate " " $ map (dropWhile isSpace) $ map (filter (/= '\r')) $ lines xs
nihil fit ex nihilo