From 10e28ef750f0c7e6bc0dfb7aabaaad8edf059e3c Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Fri, 17 Apr 2015 22:55:39 -0700 Subject: More principled fix for #1820. If the tag parses as a comment, we check to see if the input starts with `") + | otherwise -> fail "bogus comment mode, HTML5 parse error" _ -> do rendered <- manyTill anyChar (char '>') return (next, rendered ++ ">") diff --git a/tests/Tests/Readers/Markdown.hs b/tests/Tests/Readers/Markdown.hs index 1cc00fd5e..8965d1d6e 100644 --- a/tests/Tests/Readers/Markdown.hs +++ b/tests/Tests/Readers/Markdown.hs @@ -169,6 +169,9 @@ tests = [ testGroup "inline code" "test" =?> rawBlock "html" "" <> plain (str "test") <> rawBlock "html" "" + , "invalid tag (issue #1820" =: + "" =?> + para (text "") ] , "unbalanced brackets" =: "[[[[[[[[[[[[[[[hi" =?> para (text "[[[[[[[[[[[[[[[hi") -- cgit v1.2.3