git.iko.soy/typeable/pandoc
on master help sign in
Roff tokenizer: further table format spec parsing improvements.
92a810dJohn MacFarlane
src/Text/Pandoc/Readers/Roff.hs+3−1
@@ -404,7 +404,9 @@ tableOption = do
404
404
405tableFormatSpec :: PandocMonad m => RoffLexer m [[CellFormat]]
405tableFormatSpec :: PandocMonad m => RoffLexer m [[CellFormat]]
406tableFormatSpec = do
406tableFormatSpec = do
407− speclines <- tableFormatSpecLine `sepBy1` (newline <|> char ',')
407+ first <- tableFormatSpecLine
408+ rest <- many $ try $ (newline <|> char ',') *> tableFormatSpecLine
409+ let speclines = first:rest
408 spaces
410 spaces
409 char '.'
411 char '.'
410 return $ speclines ++ repeat (lastDef [] speclines) -- last line is default
412 return $ speclines ++ repeat (lastDef [] speclines) -- last line is default