diff options
Diffstat (limited to 'src/Text/Pandoc/Readers/HTML.hs')
-rw-r--r-- | src/Text/Pandoc/Readers/HTML.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Readers/HTML.hs b/src/Text/Pandoc/Readers/HTML.hs index 2ae79bebd..b668641c8 100644 --- a/src/Text/Pandoc/Readers/HTML.hs +++ b/src/Text/Pandoc/Readers/HTML.hs @@ -501,10 +501,11 @@ pTable = try $ do head' <- map snd <$> pInTag True "tbody" (if null head'' then pTh else return head'') + topfoot <- option [] $ pInTag False "tfoot" $ many pTr rowsLs <- many pTBody - rows' <- pInTag True "tfoot" $ many pTr + bottomfoot <- option [] $ pInTag False "tfoot" $ many pTr TagClose _ <- pSatisfy (matchTagClose "table") - let rows'' = concat rowsLs <> rows' + let rows'' = concat rowsLs <> topfoot <> bottomfoot let rows''' = map (map snd) rows'' -- let rows''' = map (map snd) rows'' -- fail on empty table |