git.iko.soy/typeable/pandoc
on master help sign in
Roff tokenizer: further table format spec parsing improvements.
commit92a810dc667da51d637682c5dced92381510dfe1 authorJohn MacFarlane <jgm@berkeley.edu> dateFri 26 Oct 2018, 23:02 (8 years ago) parent36f1c4f
1 file changed+3−1
src/Text/Pandoc/Readers/Roff.hs+3−1
src/Text/Pandoc/Readers/Roff.hs+3−1
@@ -404,7 +404,9 @@ tableOption = do
404404
405405tableFormatSpec :: PandocMonad m => RoffLexer m [[CellFormat]]
406406tableFormatSpec = do
407− speclines <- tableFormatSpecLine `sepBy1` (newline <|> char ',')
407+ first <- tableFormatSpecLine
408+ rest <- many $ try $ (newline <|> char ',') *> tableFormatSpecLine
409+ let speclines = first:rest
408410 spaces
409411 char '.'
410412 return $ speclines ++ repeat (lastDef [] speclines) -- last line is default