summaryrefslogtreecommitdiff
path: root/tests/Tests/Readers
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-04-17 22:55:39 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2015-04-17 22:56:33 -0700
commit10e28ef750f0c7e6bc0dfb7aabaaad8edf059e3c (patch)
tree00c0649bb6cb6f77e2cde3c55a58390defde37df /tests/Tests/Readers
parentaaf5e67624c6b9dcc2615e0e3f4ad4e622d516af (diff)
More principled fix for #1820.
If the tag parses as a comment, we check to see if the input starts with `<!--`. If not, it's bogus comment mode and we fail htmlTag. Includes test case. Closes #1820.
Diffstat (limited to 'tests/Tests/Readers')
-rw-r--r--tests/Tests/Readers/Markdown.hs3
1 files changed, 3 insertions, 0 deletions
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"
"<del>test</del>" =?>
rawBlock "html" "<del>" <> plain (str "test") <>
rawBlock "html" "</del>"
+ , "invalid tag (issue #1820" =:
+ "</ div></.div>" =?>
+ para (text "</ div></.div>")
]
, "unbalanced brackets" =:
"[[[[[[[[[[[[[[[hi" =?> para (text "[[[[[[[[[[[[[[[hi")