summaryrefslogtreecommitdiff
path: root/Text/Pandoc
diff options
context:
space:
mode:
authordefanor <defanor@uberspace.net>2017-11-03 07:34:47 +0300
committerdefanor <defanor@uberspace.net>2017-11-03 07:34:47 +0300
commitce9aadf397c1d0e0171c27ab2607f3f441bfa784 (patch)
treeb7bad67ae81d400441dfa131a795d098346a2ac0 /Text/Pandoc
parent9e3208c294dab446d21fdbdcdefdcba0e64f8cec (diff)
Remove CRs from plain text files
This is mostly needed for Gopher.
Diffstat (limited to 'Text/Pandoc')
-rw-r--r--Text/Pandoc/Readers/Plain.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Text/Pandoc/Readers/Plain.hs b/Text/Pandoc/Readers/Plain.hs
index 0f07feb..3e6a69a 100644
--- a/Text/Pandoc/Readers/Plain.hs
+++ b/Text/Pandoc/Readers/Plain.hs
@@ -27,4 +27,5 @@ lineToInlines s = let (cur, next) = break (== ' ') s
-- 'Plain' block.
readPlain :: PandocMonad m => T.Text -> m Pandoc
readPlain = pure . Pandoc mempty . pure . Plain .
- concatMap (\l -> (lineToInlines $ T.unpack l) ++ [LineBreak]) . T.lines
+ concatMap (\l -> (lineToInlines $ T.unpack l) ++ [LineBreak])
+ . T.lines . T.filter (/= '\r')