From ebc801cfc5ef99bf05d63aaac4c2ee471e40f372 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Tue, 24 Oct 2017 14:45:43 -0700 Subject: HTML reader: close td/th should close any open block tag... Closes #3991. --- src/Text/Pandoc/Readers/HTML.hs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/Text') diff --git a/src/Text/Pandoc/Readers/HTML.hs b/src/Text/Pandoc/Readers/HTML.hs index 6b3f06f4b..c648c8628 100644 --- a/src/Text/Pandoc/Readers/HTML.hs +++ b/src/Text/Pandoc/Readers/HTML.hs @@ -847,6 +847,8 @@ pCloses tagtype = try $ do (TagClose "dl") | tagtype == "dd" -> return () (TagClose "table") | tagtype == "td" -> return () (TagClose "table") | tagtype == "tr" -> return () + (TagClose "td") | tagtype `Set.member` blockHtmlTags -> return () + (TagClose "th") | tagtype `Set.member` blockHtmlTags -> return () (TagClose t') | tagtype == "p" && t' `Set.member` blockHtmlTags -> return () -- see #3794 _ -> mzero -- cgit v1.2.3