HTML reader: fixed bug in pClose.
This caused exponential parsing behavior in documnets
with unclosed tags in dl, dd, dt.
commit446cf6a1cfed364dfc0d01b39697ffde2310109d
authorJohn MacFarlane <jgm@berkeley.edu>
dateSat 21 May 2016, 23:05 (10 years ago)
parent2e266b6
src/Text/Pandoc/Readers/HTML.hs+1−1
@@ -707,7 +707,7 @@ pCloses tagtype = try $ do
707707 (TagOpen t' _) | t' `closes` tagtype -> return ()
708708 (TagClose "ul") | tagtype == "li" -> return ()
709709 (TagClose "ol") | tagtype == "li" -> return ()
710− (TagClose "dl") | tagtype == "li" -> return ()
710+ (TagClose "dl") | tagtype == "dd" -> return ()
711711 (TagClose "table") | tagtype == "td" -> return ()
712712 (TagClose "table") | tagtype == "tr" -> return ()
713713 _ -> mzero