aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2018-11-16 11:29:15 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2018-11-16 11:29:15 -0800
commitd532eb14ebaca9e6255b428d40e22284a8a981d2 (patch)
tree89a76ac323ce73aeb0f088379e76eaf378f74bd3 /src/Text/Pandoc/Readers
parente61f63253130480c43d8bb4f4531e83d0384daf5 (diff)
downloadpandoc-d532eb14ebaca9e6255b428d40e22284a8a981d2.tar.gz
HTML reader: allow tfoot before body rows.
Closes #5079.
Diffstat (limited to 'src/Text/Pandoc/Readers')
-rw-r--r--src/Text/Pandoc/Readers/HTML.hs5
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