aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2020-04-02 07:58:52 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2020-04-02 07:58:52 -0700
commit792f1a6b5767dda2e774ec938de50248e1cece27 (patch)
treecfc164511eaf109dfc0d3f5e2d397e8e14aa039d
parent92e0801daa8ffa068aeb1746e58b1c02f4feb14f (diff)
downloadpandoc-792f1a6b5767dda2e774ec938de50248e1cece27.tar.gz
HTML reader: fix parsing unclosed th elements in a table.
Closes #6247.
-rw-r--r--src/Text/Pandoc/Readers/HTML.hs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Readers/HTML.hs b/src/Text/Pandoc/Readers/HTML.hs
index dcd3c0582..6cfef0ebe 100644
--- a/src/Text/Pandoc/Readers/HTML.hs
+++ b/src/Text/Pandoc/Readers/HTML.hs
@@ -909,6 +909,7 @@ pCloses tagtype = try $ do
(TagClose "ol") | tagtype == "li" -> return ()
(TagClose "dl") | tagtype == "dd" -> return ()
(TagClose "table") | tagtype == "td" -> return ()
+ (TagClose "table") | tagtype == "th" -> return ()
(TagClose "table") | tagtype == "tr" -> return ()
(TagClose "td") | tagtype `Set.member` blockHtmlTags -> return ()
(TagClose "th") | tagtype `Set.member` blockHtmlTags -> return ()