diff options
Diffstat (limited to 'src/Text')
-rw-r--r-- | src/Text/Pandoc/Readers/Groff.hs | 2 | ||||
-rw-r--r-- | src/Text/Pandoc/Readers/Man.hs | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Readers/Groff.hs b/src/Text/Pandoc/Readers/Groff.hs index 4bc9d32cc..fbe475b96 100644 --- a/src/Text/Pandoc/Readers/Groff.hs +++ b/src/Text/Pandoc/Readers/Groff.hs @@ -356,7 +356,7 @@ tableCell = (enclosedCell <|> simpleCell) >>= lexGroff . T.pack manyTill anyChar (try (string "T}")) simpleCell = do tabChar <- tableTabChar <$> getState - many1 (notFollowedBy (char tabChar <|> newline) >> anyChar) + many (notFollowedBy (char tabChar <|> newline) >> anyChar) tableRow :: PandocMonad m => GroffLexer m [GroffTokens] tableRow = do diff --git a/src/Text/Pandoc/Readers/Man.hs b/src/Text/Pandoc/Readers/Man.hs index e0440ec61..5007aaab2 100644 --- a/src/Text/Pandoc/Readers/Man.hs +++ b/src/Text/Pandoc/Readers/Man.hs @@ -136,10 +136,12 @@ parseTable = do parseTableCell ts = do st <- getState let ts' = Foldable.toList $ unGroffTokens ts - let tcell = do + let tcell = try $ do skipMany memptyLine plain . trimInlines <$> (parseInlines <* eof) - res <- lift $ readWithMTokens tcell st ts' + res <- if null ts' + then return $ Right mempty + else lift $ readWithMTokens tcell st ts' case res of Left e -> throwError e Right x -> return x |