diff options
author | defanor <defanor@uberspace.net> | 2017-11-03 07:34:47 +0300 |
---|---|---|
committer | defanor <defanor@uberspace.net> | 2017-11-03 07:34:47 +0300 |
commit | ce9aadf397c1d0e0171c27ab2607f3f441bfa784 (patch) | |
tree | b7bad67ae81d400441dfa131a795d098346a2ac0 /Text | |
parent | 9e3208c294dab446d21fdbdcdefdcba0e64f8cec (diff) |
Remove CRs from plain text files
This is mostly needed for Gopher.
Diffstat (limited to 'Text')
-rw-r--r-- | Text/Pandoc/Readers/Plain.hs | 3 |
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') |