aboutsummaryrefslogtreecommitdiff
path: root/Print.hs
diff options
context:
space:
mode:
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