aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers/Roff.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2018-10-26 23:02:53 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2018-10-26 23:02:53 -0700
commit92a810dc667da51d637682c5dced92381510dfe1 (patch)
tree39e01bf21832ab22dc1b72019bcfb3e96b52e658 /src/Text/Pandoc/Readers/Roff.hs
parent36f1c4f39bfcebf68c5ba8f0d1c324629a3feb9e (diff)
downloadpandoc-92a810dc667da51d637682c5dced92381510dfe1.tar.gz
Roff tokenizer: further table format spec parsing improvements.
Diffstat (limited to 'src/Text/Pandoc/Readers/Roff.hs')
-rw-r--r--src/Text/Pandoc/Readers/Roff.hs4
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