@@ -501,10 +501,11 @@ pTable = try $ do
501501 head' <- map snd <$>
502502 pInTag True "tbody"
503503 (if null head'' then pTh else return head'')
504+ topfoot <- option [] $ pInTag False "tfoot" $ many pTr
504505 rowsLs <- many pTBody
505− rows' <- pInTag True "tfoot" $ many pTr
506+ bottomfoot <- option [] $ pInTag False "tfoot" $ many pTr
506507 TagClose _ <- pSatisfy (matchTagClose "table")
507− let rows'' = concat rowsLs <> rows'
508+ let rows'' = concat rowsLs <> topfoot <> bottomfoot
508509 let rows''' = map (map snd) rows''
509510 -- let rows''' = map (map snd) rows''
510511 -- fail on empty table