Permalink
Browse files

Adds additional slash tests

  • Loading branch information...
1 parent de83c53 commit 7d28394ecdd42725b24eb8b0c64c9a0dba24e746 Pete Hopkins committed Mar 8, 2012
Showing with 10 additions and 2 deletions.
  1. +10 −2 autolink.yml
View
@@ -155,8 +155,16 @@ tests:
expected: "text <a href=\"https://twitter.com/#!/search?q=%23hashtag\" title=\"#hashtag\" class=\"tweet-url hashtag\">#hashtag</a>!"
- description: "Autolink two hashtags separated by a slash"
- text: "#dodge/#answer"
- expected: "<a href=\"https://twitter.com/#!/search?q=%23dodge\" title=\"#dodge\" class=\"tweet-url hashtag\">#dodge</a>/<a href=\"https://twitter.com/#!/search?q=%23answer\" title=\"#answer\" class=\"tweet-url hashtag\">#answer</a>"
+ text: "text #dodge/#answer"
+ expected: "text <a href=\"https://twitter.com/#!/search?q=%23dodge\" title=\"#dodge\" class=\"tweet-url hashtag\">#dodge</a>/<a href=\"https://twitter.com/#!/search?q=%23answer\" title=\"#answer\" class=\"tweet-url hashtag\">#answer</a>"
+
+ - description: "Autolink hashtag before a slash"
+ text: "text #dodge/answer"
+ expected: "text <a href=\"https://twitter.com/#!/search?q=%23dodge\" title=\"#dodge\" class=\"tweet-url hashtag\">#dodge</a>/answer"
+
+ - description: "Autolink hashtag after a slash"
+ text: "text dodge/#answer"
+ expected: "text dodge/<a href=\"https://twitter.com/#!/search?q=%23answer\" title=\"#answer\" class=\"tweet-url hashtag\">#answer</a>"
- description: "Autolink hashtag followed by Japanese"
text: "text #hashtagの"

0 comments on commit 7d28394

Please sign in to comment.