diff options
author | John MacFarlane <jgm@berkeley.edu> | 2015-07-14 10:20:09 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2015-07-14 10:24:39 -0700 |
commit | 9cdfd4f6491cbf9e3002e88be8be9ebeb48ba2bb (patch) | |
tree | d666e66bb87a2932d164f05d5d297629073d006f /tests | |
parent | dce6a7388a5f546ebbfd192febcb1753b743b377 (diff) | |
download | pandoc-9cdfd4f6491cbf9e3002e88be8be9ebeb48ba2bb.tar.gz |
Improved bare autolink detection.
Previously we disallowed `-` at the end of an autolink,
and disallowed the combination `=-`.
This commit liberalizes the rules for allowing punctuation in
a bare URI.
Added test cases.
One potential drawback is that you can no longer put a bare
URI in em dashes like this
this uri---http://example.com---is an example.
But in this respect we now match github's treatment of bare URIs.
Closes #2299.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Tests/Readers/Markdown.hs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/Tests/Readers/Markdown.hs b/tests/Tests/Readers/Markdown.hs index e08ac1607..a041620e7 100644 --- a/tests/Tests/Readers/Markdown.hs +++ b/tests/Tests/Readers/Markdown.hs @@ -119,6 +119,10 @@ bareLinkTests = autolink "http://business.timesonline.co.uk/article/0,,9065-2473189,00.html") , ("http://www.mail-archive.com/ruby-talk@ruby-lang.org/", autolink "http://www.mail-archive.com/ruby-talk@ruby-lang.org/") + , ("https://example.org/?anchor=lala-", + autolink "https://example.org/?anchor=lala-") + , ("https://example.org/?anchor=-lala", + autolink "https://example.org/?anchor=-lala") ] {- |