diff options
Diffstat (limited to 'Text/Pandoc/Readers/Plain.hs')
-rw-r--r-- | Text/Pandoc/Readers/Plain.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Text/Pandoc/Readers/Plain.hs b/Text/Pandoc/Readers/Plain.hs index 3e64b6b..a66b1cd 100644 --- a/Text/Pandoc/Readers/Plain.hs +++ b/Text/Pandoc/Readers/Plain.hs @@ -43,6 +43,6 @@ lineToInlines s = let (cur, next) = break (== ' ') s -- | Reads plain text, always succeeding and producing a single -- 'Plain' block. readPlain :: PandocMonad m => T.Text -> m Pandoc -readPlain = pure . Pandoc mempty . pure . Plain . - concatMap (\l -> (lineToInlines $ T.unpack l) ++ [LineBreak]) +readPlain = pure . Pandoc mempty . pure . LineBlock + . map (\l -> (lineToInlines $ T.unpack l)) . T.lines . T.filter (/= '\r') |