Parser test for "Free external link with trailing punctuation"
authorumherirrender <umherirrender_de.wp@web.de>
Thu, 4 Dec 2014 19:50:29 +0000 (20:50 +0100)
committerumherirrender <umherirrender_de.wp@web.de>
Thu, 4 Dec 2014 19:50:29 +0000 (20:50 +0100)
Testing the letters in Parser::makeFreeExternalLink

Change-Id: If8592513aa2725a11386bbf0939333e59dc62b6d

tests/parser/parserTests.txt

index 39129cb..648c495 100644 (file)
@@ -4099,6 +4099,31 @@ External links: with no contents
 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo"><span>Bar</span></a></p>
 !! end
 
+!! test
+External links: Free with trailing punctuation
+!! wikitext
+http://example.com,
+http://example.com;
+http://example.com\
+http://example.com.
+http://example.com:
+http://example.com!
+http://example.com?
+http://example.com)
+http://example.com/url_with_(brackets)
+!! html
+<p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
+<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>;
+<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>\
+<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.
+<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
+<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>!
+<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>?
+<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
+<a rel="nofollow" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
+</p>
+!! end
+
 !! test
 External image
 !! wikitext