summaryrefslogtreecommitdiff
path: root/tests/Tests/Readers
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2013-09-01 15:18:56 -0700
committerJohn MacFarlane <fiddlosopher@gmail.com>2013-09-01 15:18:56 -0700
commit9b0b9b6e03c05ca81ff3cf52787a30ea00cb3a76 (patch)
treee331903f0830835d966689f13aeb5f1fd2414782 /tests/Tests/Readers
parent8b0052ba5b0578814a5aca14a0e02874a10cf947 (diff)
Markdown reader: Don't autolink a bare URI that is followed by `</a>`.
Closes #937.
Diffstat (limited to 'tests/Tests/Readers')
-rw-r--r--tests/Tests/Readers/Markdown.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/Tests/Readers/Markdown.hs b/tests/Tests/Readers/Markdown.hs
index 8a9ed9667..ccca147ab 100644
--- a/tests/Tests/Readers/Markdown.hs
+++ b/tests/Tests/Readers/Markdown.hs
@@ -24,7 +24,7 @@ infix 4 =:
testBareLink :: (String, Inlines) -> Test
testBareLink (inp, ils) =
test (readMarkdown def{ readerExtensions =
- Set.fromList [Ext_autolink_bare_uris] })
+ Set.fromList [Ext_autolink_bare_uris, Ext_raw_html] })
inp (inp, doc $ para ils)
autolink :: String -> Inlines
@@ -34,6 +34,9 @@ bareLinkTests :: [(String, Inlines)]
bareLinkTests =
[ ("http://google.com is a search engine.",
autolink "http://google.com" <> " is a search engine.")
+ , ("<a href=\"http://foo.bar.baz\">http://foo.bar.baz</a>",
+ rawInline "html" "<a href=\"http://foo.bar.baz\">" <>
+ "http://foo.bar.baz" <> rawInline "html" "</a>")
, ("Try this query: http://google.com?search=fish&time=hour.",
"Try this query: " <> autolink "http://google.com?search=fish&time=hour" <> ".")
, ("HTTPS://GOOGLE.COM,",