{"action":"created","comment":{"url":"https://api.github.com/repos/yyoon/Journaley/pulls/comments/48116701","id":48116701,"diff_hunk":"@@ -26,6 +28,9 @@ public static string PostMarkdown(string formattedString)\n             StringBuilder builder = new StringBuilder();\n             StringBuilder paragraphBuilder = new StringBuilder();\n \n+            // Auto-link regex. Only detects http/https links.\n+            Regex autoLink = new Regex(@\"(?i)\\b((?:https?://|www\\d{0,3}[.]|[a-z0-9.\\-]+[.][a-z]{2,4}/)(?:[^\\s()<>]+|\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\))+(?:\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\)|[^\\s`!()\\[\\]{};:'\"\".,<>?«»“”‘’]))\", RegexOptions.Multiline);","path":"Journaley/Utilities/PostMarkdownParser.cs","position":21,"original_position":21,"commit_id":"5f1c5e41bcfa542ee4ce06c3b8a1787a5f2ccee8","original_commit_id":"5f1c5e41bcfa542ee4ce06c3b8a1787a5f2ccee8","user":{"login":"yyoon","id":1309817,"avatar_url":"https://avatars.githubusercontent.com/u/1309817?v=3","gravatar_id":"","url":"https://api.github.com/users/yyoon","html_url":"https://github.com/yyoon","followers_url":"https://api.github.com/users/yyoon/followers","following_url":"https://api.github.com/users/yyoon/following{/other_user}","gists_url":"https://api.github.com/users/yyoon/gists{/gist_id}","starred_url":"https://api.github.com/users/yyoon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yyoon/subscriptions","organizations_url":"https://api.github.com/users/yyoon/orgs","repos_url":"https://api.github.com/users/yyoon/repos","events_url":"https://api.github.com/users/yyoon/events{/privacy}","received_events_url":"https://api.github.com/users/yyoon/received_events","type":"User","site_admin":false},"body":"Why the multiline option here?","created_at":"2015-12-21T04:38:54Z","updated_at":"2015-12-21T04:38:54Z","html_url":"https://github.com/yyoon/Journaley/pull/133#discussion_r48116701","pull_request_url":"https://api.github.com/repos/yyoon/Journaley/pulls/133","_links":{"self":{"href":"https://api.github.com/repos/yyoon/Journaley/pulls/comments/48116701"},"html":{"href":"https://github.com/yyoon/Journaley/pull/133#discussion_r48116701"},"pull_request":{"href":"https://api.github.com/repos/yyoon/Journaley/pulls/133"}}},"pull_request":{"url":"https://api.github.com/repos/yyoon/Journaley/pulls/133","id":53931534,"html_url":"https://github.com/yyoon/Journaley/pull/133","diff_url":"https://github.com/yyoon/Journaley/pull/133.diff","patch_url":"https://github.com/yyoon/Journaley/pull/133.patch","issue_url":"https://api.github.com/repos/yyoon/Journaley/issues/133","number":133,"state":"open","locked":false,"title":"Added the ability to autolink","user":{"login":"crxtrdude","id":5135200,"avatar_url":"https://avatars.githubusercontent.com/u/5135200?v=3","gravatar_id":"","url":"https://api.github.com/users/crxtrdude","html_url":"https://github.com/crxtrdude","followers_url":"https://api.github.com/users/crxtrdude/followers","following_url":"https://api.github.com/users/crxtrdude/following{/other_user}","gists_url":"https://api.github.com/users/crxtrdude/gists{/gist_id}","starred_url":"https://api.github.com/users/crxtrdude/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crxtrdude/subscriptions","organizations_url":"https://api.github.com/users/crxtrdude/orgs","repos_url":"https://api.github.com/users/crxtrdude/repos","events_url":"https://api.github.com/users/crxtrdude/events{/privacy}","received_events_url":"https://api.github.com/users/crxtrdude/received_events","type":"User","site_admin":false},"body":"- Converts single line http/https links and wraps them with a tags. This does not touch `img` tags and already enclosed `a` tags.\r\n\r\nThe [original regex](http://daringfireball.net/2010/07/improved_regex_for_matching_urls) by John Gruber was used here. It also has a version where it detects all URLs 'ftp or mailto', but I decided to only use http/https only.\r\n\r\nComment if there are any problems with it.","created_at":"2015-12-17T03:46:22Z","updated_at":"2015-12-21T04:38:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d5c1ce855275c6ec7268b7d8259e12d3e04f626b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/yyoon/Journaley/pulls/133/commits","review_comments_url":"https://api.github.com/repos/yyoon/Journaley/pulls/133/comments","review_comment_url":"https://api.github.com/repos/yyoon/Journaley/pulls/comments{/number}","comments_url":"https://api.github.com/repos/yyoon/Journaley/issues/133/comments","statuses_url":"https://api.github.com/repos/yyoon/Journaley/statuses/5f1c5e41bcfa542ee4ce06c3b8a1787a5f2ccee8","head":{"label":"crxtrdude:feature/external_links","ref":"feature/external_links","sha":"5f1c5e41bcfa542ee4ce06c3b8a1787a5f2ccee8","user":{"login":"crxtrdude","id":5135200,"avatar_url":"https://avatars.githubusercontent.com/u/5135200?v=3","gravatar_id":"","url":"https://api.github.com/users/crxtrdude","html_url":"https://github.com/crxtrdude","followers_url":"https://api.github.com/users/crxtrdude/followers","following_url":"https://api.github.com/users/crxtrdude/following{/other_user}","gists_url":"https://api.github.com/users/crxtrdude/gists{/gist_id}","starred_url":"https://api.github.com/users/crxtrdude/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crxtrdude/subscriptions","organizations_url":"https://api.github.com/users/crxtrdude/orgs","repos_url":"https://api.github.com/users/crxtrdude/repos","events_url":"https://api.github.com/users/crxtrdude/events{/privacy}","received_events_url":"https://api.github.com/users/crxtrdude/received_events","type":"User","site_admin":false},"repo":{"id":46601206,"name":"Journaley","full_name":"crxtrdude/Journaley","owner":{"login":"crxtrdude","id":5135200,"avatar_url":"https://avatars.githubusercontent.com/u/5135200?v=3","gravatar_id":"","url":"https://api.github.com/users/crxtrdude","html_url":"https://github.com/crxtrdude","followers_url":"https://api.github.com/users/crxtrdude/followers","following_url":"https://api.github.com/users/crxtrdude/following{/other_user}","gists_url":"https://api.github.com/users/crxtrdude/gists{/gist_id}","starred_url":"https://api.github.com/users/crxtrdude/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crxtrdude/subscriptions","organizations_url":"https://api.github.com/users/crxtrdude/orgs","repos_url":"https://api.github.com/users/crxtrdude/repos","events_url":"https://api.github.com/users/crxtrdude/events{/privacy}","received_events_url":"https://api.github.com/users/crxtrdude/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/crxtrdude/Journaley","description":"A simple and elegant open-source journal keeping software for Windows","fork":true,"url":"https://api.github.com/repos/crxtrdude/Journaley","forks_url":"https://api.github.com/repos/crxtrdude/Journaley/forks","keys_url":"https://api.github.com/repos/crxtrdude/Journaley/keys{/key_id}","collaborators_url":"https://api.github.com/repos/crxtrdude/Journaley/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/crxtrdude/Journaley/teams","hooks_url":"https://api.github.com/repos/crxtrdude/Journaley/hooks","issue_events_url":"https://api.github.com/repos/crxtrdude/Journaley/issues/events{/number}","events_url":"https://api.github.com/repos/crxtrdude/Journaley/events","assignees_url":"https://api.github.com/repos/crxtrdude/Journaley/assignees{/user}","branches_url":"https://api.github.com/repos/crxtrdude/Journaley/branches{/branch}","tags_url":"https://api.github.com/repos/crxtrdude/Journaley/tags","blobs_url":"https://api.github.com/repos/crxtrdude/Journaley/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/crxtrdude/Journaley/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/crxtrdude/Journaley/git/refs{/sha}","trees_url":"https://api.github.com/repos/crxtrdude/Journaley/git/trees{/sha}","statuses_url":"https://api.github.com/repos/crxtrdude/Journaley/statuses/{sha}","languages_url":"https://api.github.com/repos/crxtrdude/Journaley/languages","stargazers_url":"https://api.github.com/repos/crxtrdude/Journaley/stargazers","contributors_url":"https://api.github.com/repos/crxtrdude/Journaley/contributors","subscribers_url":"https://api.github.com/repos/crxtrdude/Journaley/subscribers","subscription_url":"https://api.github.com/repos/crxtrdude/Journaley/subscription","commits_url":"https://api.github.com/repos/crxtrdude/Journaley/commits{/sha}","git_commits_url":"https://api.github.com/repos/crxtrdude/Journaley/git/commits{/sha}","comments_url":"https://api.github.com/repos/crxtrdude/Journaley/comments{/number}","issue_comment_url":"https://api.github.com/repos/crxtrdude/Journaley/issues/comments{/number}","contents_url":"https://api.github.com/repos/crxtrdude/Journaley/contents/{+path}","compare_url":"https://api.github.com/repos/crxtrdude/Journaley/compare/{base}...{head}","merges_url":"https://api.github.com/repos/crxtrdude/Journaley/merges","archive_url":"https://api.github.com/repos/crxtrdude/Journaley/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/crxtrdude/Journaley/downloads","issues_url":"https://api.github.com/repos/crxtrdude/Journaley/issues{/number}","pulls_url":"https://api.github.com/repos/crxtrdude/Journaley/pulls{/number}","milestones_url":"https://api.github.com/repos/crxtrdude/Journaley/milestones{/number}","notifications_url":"https://api.github.com/repos/crxtrdude/Journaley/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/crxtrdude/Journaley/labels{/name}","releases_url":"https://api.github.com/repos/crxtrdude/Journaley/releases{/id}","created_at":"2015-11-21T04:32:28Z","updated_at":"2015-11-21T04:32:30Z","pushed_at":"2015-12-17T03:43:21Z","git_url":"git://github.com/crxtrdude/Journaley.git","ssh_url":"git@github.com:crxtrdude/Journaley.git","clone_url":"https://github.com/crxtrdude/Journaley.git","svn_url":"https://github.com/crxtrdude/Journaley","homepage":"http://journaleyapp.com/","size":32826,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"yyoon:develop","ref":"develop","sha":"e454e8d1c8ccab40fdb95661211de4d196e289da","user":{"login":"yyoon","id":1309817,"avatar_url":"https://avatars.githubusercontent.com/u/1309817?v=3","gravatar_id":"","url":"https://api.github.com/users/yyoon","html_url":"https://github.com/yyoon","followers_url":"https://api.github.com/users/yyoon/followers","following_url":"https://api.github.com/users/yyoon/following{/other_user}","gists_url":"https://api.github.com/users/yyoon/gists{/gist_id}","starred_url":"https://api.github.com/users/yyoon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yyoon/subscriptions","organizations_url":"https://api.github.com/users/yyoon/orgs","repos_url":"https://api.github.com/users/yyoon/repos","events_url":"https://api.github.com/users/yyoon/events{/privacy}","received_events_url":"https://api.github.com/users/yyoon/received_events","type":"User","site_admin":false},"repo":{"id":13669479,"name":"Journaley","full_name":"yyoon/Journaley","owner":{"login":"yyoon","id":1309817,"avatar_url":"https://avatars.githubusercontent.com/u/1309817?v=3","gravatar_id":"","url":"https://api.github.com/users/yyoon","html_url":"https://github.com/yyoon","followers_url":"https://api.github.com/users/yyoon/followers","following_url":"https://api.github.com/users/yyoon/following{/other_user}","gists_url":"https://api.github.com/users/yyoon/gists{/gist_id}","starred_url":"https://api.github.com/users/yyoon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yyoon/subscriptions","organizations_url":"https://api.github.com/users/yyoon/orgs","repos_url":"https://api.github.com/users/yyoon/repos","events_url":"https://api.github.com/users/yyoon/events{/privacy}","received_events_url":"https://api.github.com/users/yyoon/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yyoon/Journaley","description":"A simple and elegant open-source journal keeping software for Windows","fork":false,"url":"https://api.github.com/repos/yyoon/Journaley","forks_url":"https://api.github.com/repos/yyoon/Journaley/forks","keys_url":"https://api.github.com/repos/yyoon/Journaley/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yyoon/Journaley/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yyoon/Journaley/teams","hooks_url":"https://api.github.com/repos/yyoon/Journaley/hooks","issue_events_url":"https://api.github.com/repos/yyoon/Journaley/issues/events{/number}","events_url":"https://api.github.com/repos/yyoon/Journaley/events","assignees_url":"https://api.github.com/repos/yyoon/Journaley/assignees{/user}","branches_url":"https://api.github.com/repos/yyoon/Journaley/branches{/branch}","tags_url":"https://api.github.com/repos/yyoon/Journaley/tags","blobs_url":"https://api.github.com/repos/yyoon/Journaley/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yyoon/Journaley/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yyoon/Journaley/git/refs{/sha}","trees_url":"https://api.github.com/repos/yyoon/Journaley/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yyoon/Journaley/statuses/{sha}","languages_url":"https://api.github.com/repos/yyoon/Journaley/languages","stargazers_url":"https://api.github.com/repos/yyoon/Journaley/stargazers","contributors_url":"https://api.github.com/repos/yyoon/Journaley/contributors","subscribers_url":"https://api.github.com/repos/yyoon/Journaley/subscribers","subscription_url":"https://api.github.com/repos/yyoon/Journaley/subscription","commits_url":"https://api.github.com/repos/yyoon/Journaley/commits{/sha}","git_commits_url":"https://api.github.com/repos/yyoon/Journaley/git/commits{/sha}","comments_url":"https://api.github.com/repos/yyoon/Journaley/comments{/number}","issue_comment_url":"https://api.github.com/repos/yyoon/Journaley/issues/comments{/number}","contents_url":"https://api.github.com/repos/yyoon/Journaley/contents/{+path}","compare_url":"https://api.github.com/repos/yyoon/Journaley/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yyoon/Journaley/merges","archive_url":"https://api.github.com/repos/yyoon/Journaley/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yyoon/Journaley/downloads","issues_url":"https://api.github.com/repos/yyoon/Journaley/issues{/number}","pulls_url":"https://api.github.com/repos/yyoon/Journaley/pulls{/number}","milestones_url":"https://api.github.com/repos/yyoon/Journaley/milestones{/number}","notifications_url":"https://api.github.com/repos/yyoon/Journaley/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yyoon/Journaley/labels{/name}","releases_url":"https://api.github.com/repos/yyoon/Journaley/releases{/id}","created_at":"2013-10-18T05:04:38Z","updated_at":"2015-12-11T05:06:13Z","pushed_at":"2015-12-20T21:13:08Z","git_url":"git://github.com/yyoon/Journaley.git","ssh_url":"git@github.com:yyoon/Journaley.git","clone_url":"https://github.com/yyoon/Journaley.git","svn_url":"https://github.com/yyoon/Journaley","homepage":"http://journaleyapp.com/","size":33061,"stargazers_count":74,"watchers_count":74,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":12,"mirror_url":null,"open_issues_count":26,"forks":12,"open_issues":26,"watchers":74,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/yyoon/Journaley/pulls/133"},"html":{"href":"https://github.com/yyoon/Journaley/pull/133"},"issue":{"href":"https://api.github.com/repos/yyoon/Journaley/issues/133"},"comments":{"href":"https://api.github.com/repos/yyoon/Journaley/issues/133/comments"},"review_comments":{"href":"https://api.github.com/repos/yyoon/Journaley/pulls/133/comments"},"review_comment":{"href":"https://api.github.com/repos/yyoon/Journaley/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/yyoon/Journaley/pulls/133/commits"},"statuses":{"href":"https://api.github.com/repos/yyoon/Journaley/statuses/5f1c5e41bcfa542ee4ce06c3b8a1787a5f2ccee8"}}}}