diff options
author | John MacFarlane <jgm@berkeley.edu> | 2017-10-24 14:27:49 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2017-10-24 14:27:49 -0700 |
commit | d2c4243f89a6368d4f9f8a511d9b026d0be19cd8 (patch) | |
tree | 6b0a91dd08c3d07d68d247303690e528e046762d | |
parent | 513b16a71b30a04cc91c056a22e2761f7ea554d2 (diff) | |
download | pandoc-d2c4243f89a6368d4f9f8a511d9b026d0be19cd8.tar.gz |
HTML reader: td or th implicitly closes blocks within last td/th.
-rw-r--r-- | src/Text/Pandoc/Readers/HTML.hs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/HTML.hs b/src/Text/Pandoc/Readers/HTML.hs index a545f3f3d..98ba6b8c9 100644 --- a/src/Text/Pandoc/Readers/HTML.hs +++ b/src/Text/Pandoc/Readers/HTML.hs @@ -1036,7 +1036,11 @@ _ `closes` "html" = False "body" `closes` "head" = True "a" `closes` "a" = True "li" `closes` "li" = True -"th" `closes` t | t `elem` ["th","td"] = True +t1 `closes` t2 + | t1 `elem` ["th","td"] && + t2 `Set.member` blockTags && + t2 /= "tr" && + t2 /= "table" = True "tr" `closes` t | t `elem` ["th","td","tr"] = True "dd" `closes` t | t `elem` ["dt", "dd"] = True "dt" `closes` t | t `elem` ["dt","dd"] = True |