From ce9aadf397c1d0e0171c27ab2607f3f441bfa784 Mon Sep 17 00:00:00 2001 From: defanor Date: Fri, 3 Nov 2017 07:34:47 +0300 Subject: Remove CRs from plain text files This is mostly needed for Gopher. --- Text/Pandoc/Readers/Plain.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Text/Pandoc') 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') -- cgit v1.2.3