diff options
author | John MacFarlane <jgm@berkeley.edu> | 2018-10-26 23:02:53 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2018-10-26 23:02:53 -0700 |
commit | 92a810dc667da51d637682c5dced92381510dfe1 (patch) | |
tree | 39e01bf21832ab22dc1b72019bcfb3e96b52e658 /src | |
parent | 36f1c4f39bfcebf68c5ba8f0d1c324629a3feb9e (diff) | |
download | pandoc-92a810dc667da51d637682c5dced92381510dfe1.tar.gz |
Roff tokenizer: further table format spec parsing improvements.
Diffstat (limited to 'src')
-rw-r--r-- | src/Text/Pandoc/Readers/Roff.hs | 4 |
1 files changed, 3 insertions, 1 deletions
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 |