Skip to content
This repository has been archived by the owner on Sep 18, 2021. It is now read-only.

Commit

Permalink
Tweak cases for matching parentheses in URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
hoverbird committed Jul 9, 2010
1 parent 9acf952 commit 83e4218
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions autolink.yml
Expand Up @@ -143,17 +143,17 @@ tests:
text: "いまなにしてるhttp://example.comいまなにしてる"
expected: "いまなにしてる<a href=\"http://example.com\">http://example.com</a>いまなにしてる"

- description: "Autolink url surrounded by parentheses"
- description: "Autolink url surrounded by parentheses does not capture them"
text: "text (http://example.com)"
expected: "text (<a href=\"http://example.com\">http://example.com</a>)"

- description: "Autolink url with path surrounded by parentheses"
- description: "Autolink url with path surrounded by parentheses does not capture them"
text: "text (http://example.com/test)"
expected: "text (<a href=\"http://example.com/test\">http://example.com/test</a>)"

- description: "Autolink url with embedded parentheses"
text: "text http://example.com/(session_id_here)/foo is an IIS thing"
expected: "text (<a href=\"http://example.com/(session_id_here)/foo\">http://example.com/(session_id_here)/foo</a>)"
text: "text http://msdn.com/S(deadbeef)/page.htm"
expected: "text (<a href=\"http://msdn.com/S(deadbeef)/page.htm\">http://msdn.com/S(deadbeef)/page.htm</a>"

- description: "Autolink url should NOT capture unbalanced parens"
text: "Parenthetically bad http://example.com/i_has_a_) thing"
Expand Down

0 comments on commit 83e4218

Please sign in to comment.