Roff tokenizer: further table format spec parsing improvements.

This commit is contained in:
John MacFarlane 2018-10-26 23:02:53 -07:00
parent 36f1c4f39b
commit 92a810dc66

View file

@ -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