{"action":"created","comment":{"url":"https://api.github.com/repos/jch/html-pipeline/pulls/comments/22503985","id":22503985,"diff_hunk":"@@ -72,6 +72,34 @@ def test_links_to_more_info_when_info_url_given\n       filter(body, '/', 'https://github.com/blog/821').to_html\n   end\n \n+  def test_base_url_slash\n+    body = \"<p>Hi, @jch!</p>\"\n+    link = \"<a href=\\\"/jch\\\" class=\\\"user-mention\\\">@jch</a>\"\n+    assert_equal \"<p>Hi, #{link}!</p>\",\n+      filter(body, '/').to_html\n+  end\n+\n+  def test_base_url_under_custom_route\n+    body = \"<p>Hi, @jch!</p>\"\n+    link = \"<a href=\\\"/userprofile/jch\\\" class=\\\"user-mention\\\">@jch</a>\"\n+    assert_equal \"<p>Hi, #{link}!</p>\",\n+      filter(body, '/userprofile').to_html\n+  end\n+\n+  def test_base_url_tilde\n+    body = \"<p>Hi, @jch!</p>\"\n+    link = \"<a href=\\\"/~jch\\\" class=\\\"user-mention\\\">@jch</a>\"\n+    assert_equal \"<p>Hi, #{link}!</p>\",\n+      filter(body, '~').to_html\n+  end","path":"test/html/pipeline/mention_filter_test.rb","position":null,"original_position":23,"commit_id":"4b27f93c5c2679840847957a2935f85d5d5a385b","original_commit_id":"8e34e47305268e44b550332a524f844f2809ee82","user":{"login":"JuanitoFatas","id":1000669,"avatar_url":"https://avatars.githubusercontent.com/u/1000669?v=3","gravatar_id":"","url":"https://api.github.com/users/JuanitoFatas","html_url":"https://github.com/JuanitoFatas","followers_url":"https://api.github.com/users/JuanitoFatas/followers","following_url":"https://api.github.com/users/JuanitoFatas/following{/other_user}","gists_url":"https://api.github.com/users/JuanitoFatas/gists{/gist_id}","starred_url":"https://api.github.com/users/JuanitoFatas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuanitoFatas/subscriptions","organizations_url":"https://api.github.com/users/JuanitoFatas/orgs","repos_url":"https://api.github.com/users/JuanitoFatas/repos","events_url":"https://api.github.com/users/JuanitoFatas/events{/privacy}","received_events_url":"https://api.github.com/users/JuanitoFatas/received_events","type":"User","site_admin":false},"body":"OK! I think it is reasonable not to guard for bad input. Lesson learned, thank you again! I have applied your commit. :beers: ","created_at":"2015-01-06T01:50:55Z","updated_at":"2015-01-06T01:50:55Z","html_url":"https://github.com/jch/html-pipeline/pull/167#discussion_r22503985","pull_request_url":"https://api.github.com/repos/jch/html-pipeline/pulls/167","_links":{"self":{"href":"https://api.github.com/repos/jch/html-pipeline/pulls/comments/22503985"},"html":{"href":"https://github.com/jch/html-pipeline/pull/167#discussion_r22503985"},"pull_request":{"href":"https://api.github.com/repos/jch/html-pipeline/pulls/167"}}},"pull_request":{"url":"https://api.github.com/repos/jch/html-pipeline/pulls/167","id":26031925,"html_url":"https://github.com/jch/html-pipeline/pull/167","diff_url":"https://github.com/jch/html-pipeline/pull/167.diff","patch_url":"https://github.com/jch/html-pipeline/pull/167.patch","issue_url":"https://api.github.com/repos/jch/html-pipeline/issues/167","number":167,"state":"open","locked":false,"title":"Support ~login for MentionFilter.","user":{"login":"JuanitoFatas","id":1000669,"avatar_url":"https://avatars.githubusercontent.com/u/1000669?v=3","gravatar_id":"","url":"https://api.github.com/users/JuanitoFatas","html_url":"https://github.com/JuanitoFatas","followers_url":"https://api.github.com/users/JuanitoFatas/followers","following_url":"https://api.github.com/users/JuanitoFatas/following{/other_user}","gists_url":"https://api.github.com/users/JuanitoFatas/gists{/gist_id}","starred_url":"https://api.github.com/users/JuanitoFatas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuanitoFatas/subscriptions","organizations_url":"https://api.github.com/users/JuanitoFatas/orgs","repos_url":"https://api.github.com/users/JuanitoFatas/repos","events_url":"https://api.github.com/users/JuanitoFatas/events{/privacy}","received_events_url":"https://api.github.com/users/JuanitoFatas/received_events","type":"User","site_admin":false},"body":"Closes #161.\r\n\r\ncc @simeonwillbanks\r\n\r\nPlease :eyes:\r\n\r\nThanks!","created_at":"2014-12-14T08:24:59Z","updated_at":"2015-01-06T01:50:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"85a77e0c9e47b9ee98991689ddc6833b192db749","assignee":{"login":"simeonwillbanks","id":164506,"avatar_url":"https://avatars.githubusercontent.com/u/164506?v=3","gravatar_id":"","url":"https://api.github.com/users/simeonwillbanks","html_url":"https://github.com/simeonwillbanks","followers_url":"https://api.github.com/users/simeonwillbanks/followers","following_url":"https://api.github.com/users/simeonwillbanks/following{/other_user}","gists_url":"https://api.github.com/users/simeonwillbanks/gists{/gist_id}","starred_url":"https://api.github.com/users/simeonwillbanks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simeonwillbanks/subscriptions","organizations_url":"https://api.github.com/users/simeonwillbanks/orgs","repos_url":"https://api.github.com/users/simeonwillbanks/repos","events_url":"https://api.github.com/users/simeonwillbanks/events{/privacy}","received_events_url":"https://api.github.com/users/simeonwillbanks/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/jch/html-pipeline/pulls/167/commits","review_comments_url":"https://api.github.com/repos/jch/html-pipeline/pulls/167/comments","review_comment_url":"https://api.github.com/repos/jch/html-pipeline/pulls/comments/{number}","comments_url":"https://api.github.com/repos/jch/html-pipeline/issues/167/comments","statuses_url":"https://api.github.com/repos/jch/html-pipeline/statuses/4b27f93c5c2679840847957a2935f85d5d5a385b","head":{"label":"JuanitoFatas:fix/mention-filter-tilde","ref":"fix/mention-filter-tilde","sha":"4b27f93c5c2679840847957a2935f85d5d5a385b","user":{"login":"JuanitoFatas","id":1000669,"avatar_url":"https://avatars.githubusercontent.com/u/1000669?v=3","gravatar_id":"","url":"https://api.github.com/users/JuanitoFatas","html_url":"https://github.com/JuanitoFatas","followers_url":"https://api.github.com/users/JuanitoFatas/followers","following_url":"https://api.github.com/users/JuanitoFatas/following{/other_user}","gists_url":"https://api.github.com/users/JuanitoFatas/gists{/gist_id}","starred_url":"https://api.github.com/users/JuanitoFatas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuanitoFatas/subscriptions","organizations_url":"https://api.github.com/users/JuanitoFatas/orgs","repos_url":"https://api.github.com/users/JuanitoFatas/repos","events_url":"https://api.github.com/users/JuanitoFatas/events{/privacy}","received_events_url":"https://api.github.com/users/JuanitoFatas/received_events","type":"User","site_admin":false},"repo":{"id":27988220,"name":"html-pipeline","full_name":"JuanitoFatas/html-pipeline","owner":{"login":"JuanitoFatas","id":1000669,"avatar_url":"https://avatars.githubusercontent.com/u/1000669?v=3","gravatar_id":"","url":"https://api.github.com/users/JuanitoFatas","html_url":"https://github.com/JuanitoFatas","followers_url":"https://api.github.com/users/JuanitoFatas/followers","following_url":"https://api.github.com/users/JuanitoFatas/following{/other_user}","gists_url":"https://api.github.com/users/JuanitoFatas/gists{/gist_id}","starred_url":"https://api.github.com/users/JuanitoFatas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuanitoFatas/subscriptions","organizations_url":"https://api.github.com/users/JuanitoFatas/orgs","repos_url":"https://api.github.com/users/JuanitoFatas/repos","events_url":"https://api.github.com/users/JuanitoFatas/events{/privacy}","received_events_url":"https://api.github.com/users/JuanitoFatas/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/JuanitoFatas/html-pipeline","description":"HTML processing filters and utilities","fork":true,"url":"https://api.github.com/repos/JuanitoFatas/html-pipeline","forks_url":"https://api.github.com/repos/JuanitoFatas/html-pipeline/forks","keys_url":"https://api.github.com/repos/JuanitoFatas/html-pipeline/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JuanitoFatas/html-pipeline/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JuanitoFatas/html-pipeline/teams","hooks_url":"https://api.github.com/repos/JuanitoFatas/html-pipeline/hooks","issue_events_url":"https://api.github.com/repos/JuanitoFatas/html-pipeline/issues/events{/number}","events_url":"https://api.github.com/repos/JuanitoFatas/html-pipeline/events","assignees_url":"https://api.github.com/repos/JuanitoFatas/html-pipeline/assignees{/user}","branches_url":"https://api.github.com/repos/JuanitoFatas/html-pipeline/branches{/branch}","tags_url":"https://api.github.com/repos/JuanitoFatas/html-pipeline/tags","blobs_url":"https://api.github.com/repos/JuanitoFatas/html-pipeline/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JuanitoFatas/html-pipeline/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JuanitoFatas/html-pipeline/git/refs{/sha}","trees_url":"https://api.github.com/repos/JuanitoFatas/html-pipeline/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JuanitoFatas/html-pipeline/statuses/{sha}","languages_url":"https://api.github.com/repos/JuanitoFatas/html-pipeline/languages","stargazers_url":"https://api.github.com/repos/JuanitoFatas/html-pipeline/stargazers","contributors_url":"https://api.github.com/repos/JuanitoFatas/html-pipeline/contributors","subscribers_url":"https://api.github.com/repos/JuanitoFatas/html-pipeline/subscribers","subscription_url":"https://api.github.com/repos/JuanitoFatas/html-pipeline/subscription","commits_url":"https://api.github.com/repos/JuanitoFatas/html-pipeline/commits{/sha}","git_commits_url":"https://api.github.com/repos/JuanitoFatas/html-pipeline/git/commits{/sha}","comments_url":"https://api.github.com/repos/JuanitoFatas/html-pipeline/comments{/number}","issue_comment_url":"https://api.github.com/repos/JuanitoFatas/html-pipeline/issues/comments/{number}","contents_url":"https://api.github.com/repos/JuanitoFatas/html-pipeline/contents/{+path}","compare_url":"https://api.github.com/repos/JuanitoFatas/html-pipeline/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JuanitoFatas/html-pipeline/merges","archive_url":"https://api.github.com/repos/JuanitoFatas/html-pipeline/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JuanitoFatas/html-pipeline/downloads","issues_url":"https://api.github.com/repos/JuanitoFatas/html-pipeline/issues{/number}","pulls_url":"https://api.github.com/repos/JuanitoFatas/html-pipeline/pulls{/number}","milestones_url":"https://api.github.com/repos/JuanitoFatas/html-pipeline/milestones{/number}","notifications_url":"https://api.github.com/repos/JuanitoFatas/html-pipeline/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JuanitoFatas/html-pipeline/labels{/name}","releases_url":"https://api.github.com/repos/JuanitoFatas/html-pipeline/releases{/id}","created_at":"2014-12-14T08:23:16Z","updated_at":"2014-12-14T08:23:17Z","pushed_at":"2015-01-06T01:48:27Z","git_url":"git://github.com/JuanitoFatas/html-pipeline.git","ssh_url":"git@github.com:JuanitoFatas/html-pipeline.git","clone_url":"https://github.com/JuanitoFatas/html-pipeline.git","svn_url":"https://github.com/JuanitoFatas/html-pipeline","homepage":null,"size":813,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"jch:master","ref":"master","sha":"5feb0c185fb1e5037e3ad6d6bd533fb4af3685d8","user":{"login":"jch","id":19874,"avatar_url":"https://avatars.githubusercontent.com/u/19874?v=3","gravatar_id":"","url":"https://api.github.com/users/jch","html_url":"https://github.com/jch","followers_url":"https://api.github.com/users/jch/followers","following_url":"https://api.github.com/users/jch/following{/other_user}","gists_url":"https://api.github.com/users/jch/gists{/gist_id}","starred_url":"https://api.github.com/users/jch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jch/subscriptions","organizations_url":"https://api.github.com/users/jch/orgs","repos_url":"https://api.github.com/users/jch/repos","events_url":"https://api.github.com/users/jch/events{/privacy}","received_events_url":"https://api.github.com/users/jch/received_events","type":"User","site_admin":true},"repo":{"id":5262776,"name":"html-pipeline","full_name":"jch/html-pipeline","owner":{"login":"jch","id":19874,"avatar_url":"https://avatars.githubusercontent.com/u/19874?v=3","gravatar_id":"","url":"https://api.github.com/users/jch","html_url":"https://github.com/jch","followers_url":"https://api.github.com/users/jch/followers","following_url":"https://api.github.com/users/jch/following{/other_user}","gists_url":"https://api.github.com/users/jch/gists{/gist_id}","starred_url":"https://api.github.com/users/jch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jch/subscriptions","organizations_url":"https://api.github.com/users/jch/orgs","repos_url":"https://api.github.com/users/jch/repos","events_url":"https://api.github.com/users/jch/events{/privacy}","received_events_url":"https://api.github.com/users/jch/received_events","type":"User","site_admin":true},"private":false,"html_url":"https://github.com/jch/html-pipeline","description":"HTML processing filters and utilities","fork":false,"url":"https://api.github.com/repos/jch/html-pipeline","forks_url":"https://api.github.com/repos/jch/html-pipeline/forks","keys_url":"https://api.github.com/repos/jch/html-pipeline/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jch/html-pipeline/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jch/html-pipeline/teams","hooks_url":"https://api.github.com/repos/jch/html-pipeline/hooks","issue_events_url":"https://api.github.com/repos/jch/html-pipeline/issues/events{/number}","events_url":"https://api.github.com/repos/jch/html-pipeline/events","assignees_url":"https://api.github.com/repos/jch/html-pipeline/assignees{/user}","branches_url":"https://api.github.com/repos/jch/html-pipeline/branches{/branch}","tags_url":"https://api.github.com/repos/jch/html-pipeline/tags","blobs_url":"https://api.github.com/repos/jch/html-pipeline/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jch/html-pipeline/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jch/html-pipeline/git/refs{/sha}","trees_url":"https://api.github.com/repos/jch/html-pipeline/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jch/html-pipeline/statuses/{sha}","languages_url":"https://api.github.com/repos/jch/html-pipeline/languages","stargazers_url":"https://api.github.com/repos/jch/html-pipeline/stargazers","contributors_url":"https://api.github.com/repos/jch/html-pipeline/contributors","subscribers_url":"https://api.github.com/repos/jch/html-pipeline/subscribers","subscription_url":"https://api.github.com/repos/jch/html-pipeline/subscription","commits_url":"https://api.github.com/repos/jch/html-pipeline/commits{/sha}","git_commits_url":"https://api.github.com/repos/jch/html-pipeline/git/commits{/sha}","comments_url":"https://api.github.com/repos/jch/html-pipeline/comments{/number}","issue_comment_url":"https://api.github.com/repos/jch/html-pipeline/issues/comments/{number}","contents_url":"https://api.github.com/repos/jch/html-pipeline/contents/{+path}","compare_url":"https://api.github.com/repos/jch/html-pipeline/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jch/html-pipeline/merges","archive_url":"https://api.github.com/repos/jch/html-pipeline/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jch/html-pipeline/downloads","issues_url":"https://api.github.com/repos/jch/html-pipeline/issues{/number}","pulls_url":"https://api.github.com/repos/jch/html-pipeline/pulls{/number}","milestones_url":"https://api.github.com/repos/jch/html-pipeline/milestones{/number}","notifications_url":"https://api.github.com/repos/jch/html-pipeline/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jch/html-pipeline/labels{/name}","releases_url":"https://api.github.com/repos/jch/html-pipeline/releases{/id}","created_at":"2012-08-01T18:07:58Z","updated_at":"2015-01-05T21:55:37Z","pushed_at":"2015-01-05T23:03:31Z","git_url":"git://github.com/jch/html-pipeline.git","ssh_url":"git@github.com:jch/html-pipeline.git","clone_url":"https://github.com/jch/html-pipeline.git","svn_url":"https://github.com/jch/html-pipeline","homepage":null,"size":1592,"stargazers_count":1346,"watchers_count":1346,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":153,"mirror_url":null,"open_issues_count":7,"forks":153,"open_issues":7,"watchers":1346,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jch/html-pipeline/pulls/167"},"html":{"href":"https://github.com/jch/html-pipeline/pull/167"},"issue":{"href":"https://api.github.com/repos/jch/html-pipeline/issues/167"},"comments":{"href":"https://api.github.com/repos/jch/html-pipeline/issues/167/comments"},"review_comments":{"href":"https://api.github.com/repos/jch/html-pipeline/pulls/167/comments"},"review_comment":{"href":"https://api.github.com/repos/jch/html-pipeline/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/jch/html-pipeline/pulls/167/commits"},"statuses":{"href":"https://api.github.com/repos/jch/html-pipeline/statuses/4b27f93c5c2679840847957a2935f85d5d5a385b"}}}}