diff options
author | John MacFarlane <jgm@berkeley.edu> | 2018-10-25 22:53:48 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2018-10-25 22:53:48 -0700 |
commit | 23ca15e7ad28010d98c3c1fc6b850271b62e9dc2 (patch) | |
tree | eb75b6a649913e3c35d763ea18945f653fb27157 /src/Text/Pandoc/Readers/Man.hs | |
parent | 1ee594bf0e583fd4145765bb429dc9404b9963fe (diff) | |
download | pandoc-23ca15e7ad28010d98c3c1fc6b850271b62e9dc2.tar.gz |
Man reader: allow empty simple table cells.
Diffstat (limited to 'src/Text/Pandoc/Readers/Man.hs')
-rw-r--r-- | src/Text/Pandoc/Readers/Man.hs | 6 |
1 files changed, 4 insertions, 2 deletions
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 |