aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Readers/Groff.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Readers/Groff.hs b/src/Text/Pandoc/Readers/Groff.hs
index fbe475b96..a752c6445 100644
--- a/src/Text/Pandoc/Readers/Groff.hs
+++ b/src/Text/Pandoc/Readers/Groff.hs
@@ -337,14 +337,19 @@ lexMacro = do
lexTable :: PandocMonad m => SourcePos -> GroffLexer m GroffTokens
lexTable pos = do
+ skipMany lexComment
spaces
opts <- option [] tableOptions
case lookup "tab" opts of
Just (c:_) -> modifyState $ \st -> st{ tableTabChar = c }
_ -> modifyState $ \st -> st{ tableTabChar = '\t' }
spaces
+ skipMany lexComment
+ spaces
aligns <- tableFormatSpec
spaces
+ skipMany lexComment
+ spaces
rows <- manyTill tableRow (try (string ".TE" >> skipMany spacetab >> eofline))
return $ singleTok $ MTable opts aligns rows pos
@@ -365,6 +370,7 @@ tableRow = do
cs <- many $ try (char tabChar >> tableCell)
skipMany spacetab
eofline
+ skipMany lexComment
return (c:cs)
tableOptions :: PandocMonad m => GroffLexer m [TableOption]