From 92a810dc667da51d637682c5dced92381510dfe1 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Fri, 26 Oct 2018 23:02:53 -0700 Subject: Roff tokenizer: further table format spec parsing improvements. --- src/Text/Pandoc/Readers/Roff.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/Text/Pandoc/Readers/Roff.hs b/src/Text/Pandoc/Readers/Roff.hs index c05b87b28..bbbe49171 100644 --- a/src/Text/Pandoc/Readers/Roff.hs +++ b/src/Text/Pandoc/Readers/Roff.hs @@ -404,7 +404,9 @@ tableOption = do tableFormatSpec :: PandocMonad m => RoffLexer m [[CellFormat]] tableFormatSpec = do - speclines <- tableFormatSpecLine `sepBy1` (newline <|> char ',') + first <- tableFormatSpecLine + rest <- many $ try $ (newline <|> char ',') *> tableFormatSpecLine + let speclines = first:rest spaces char '.' return $ speclines ++ repeat (lastDef [] speclines) -- last line is default -- cgit v1.2.3