From d2da10d36b857e399e10388ddc6f66850211ec77 Mon Sep 17 00:00:00 2001 From: defanor Date: Sat, 28 Oct 2017 03:16:26 +0300 Subject: Improve plaintext rendering Reuse lineToInlines previously used for Gopher, and adjust fitLines. --- Text/Pandoc/Readers/Gopher.hs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'Text/Pandoc/Readers/Gopher.hs') diff --git a/Text/Pandoc/Readers/Gopher.hs b/Text/Pandoc/Readers/Gopher.hs index 33dec3e..694720d 100644 --- a/Text/Pandoc/Readers/Gopher.hs +++ b/Text/Pandoc/Readers/Gopher.hs @@ -16,14 +16,8 @@ import Text.Pandoc.Definition import Text.Pandoc.Error import Text.Parsec import Text.Parsec.String +import Text.Pandoc.Readers.Plain --- | Translates a text line into a list of 'Inline' elements suitable --- for further processing. -lineToInlines :: String -> [Inline] -lineToInlines [] = [] -lineToInlines (' ':rest) = Space : lineToInlines rest -lineToInlines s = let (cur, next) = break (== ' ') s - in Str cur : lineToInlines next -- | UNASCII ::= ASCII - [Tab CR-LF NUL]. unascii :: Parser Char -- cgit v1.2.3