Permalink
Browse files

Allow unicode characters in domains and colons preceding urls

  • Loading branch information...
1 parent b5f7f2d commit ba876020d6c9a960ef714f052e08e0f61182adb5 @hoverbird hoverbird committed Feb 3, 2010
Showing with 13 additions and 5 deletions.
  1. +9 −1 autolink.yml
  2. +4 −4 extract.yml
View
@@ -145,7 +145,15 @@ tests:
- description: "Autolink url surrounded by parentheses"
text: "text (http://example.com)"
- expected: "text (<a href=\"http://example.com\">http://example.com</a>)"
+ expected: 'text (<a href=\"http://example.com\">http://example.com</a>)'
+
+ - description : "Autolink url containing unicode characters"
+ text: "I enjoy Macintosh Brand computers: http://✪df.ws/ejp"
+ expected: 'I enjoy Macintosh Brand computers: <a href=\"http://✪df.ws/ejp">http://✪df.ws/ejp</a>'
+
+ - description: "Autolink url preceded by :"
+ text: "text:http://example.com"
+ expected: "text:<a href=\"http://example.com\">http://example.com</a>"
- description: "Autolink url followed by ? (without it)"
text: "text http://example.com?"
View
@@ -135,6 +135,10 @@ tests:
text: "text http://www.ams.org/bookstore-getitem/item=mbk-59"
expected: ["http://www.ams.org/bookstore-getitem/item=mbk-59"]
+ - description: "Extract valid URL: http://✪df.ws/ejp"
+ text: "text http://✪df.ws/ejp"
+ expected: ["http://✪df.ws/ejp"]
+
- description: "Extract valid URL: http://chilp.it/?77e8fd"
text: "text http://chilp.it/?77e8fd"
expected: ["http://chilp.it/?77e8fd"]
@@ -151,10 +155,6 @@ tests:
text: "text http://tld-too-short.x"
expected: []
- - description: "DO NOT extract invalid URL: http://doman-dash_2314352345_dfasd.foo-cow_4352.com"
- text: "text http://doman-dash_2314352345_dfasd.foo-cow_4352.com"
- expected: []
-
hashtags:
- description: "Extract an all-alpha hashtag"
text: "a #hashtag here"

0 comments on commit ba87602

Please sign in to comment.