GitHub PullRequestReviewCommentEvent at 2014-12-12 14:35:19
Repository: tern
Actor: marijnh
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/marijnh/tern/pulls/comments/21747009","id":21747009,"diff_hunk":"@@ -280,9 +280,9 @@\n         case \"type\":\n           type = parsed; break;\n         case \"param\": case \"arg\": case \"argument\":\n-          var name = m[2].slice(parsed.end).match(/^\\s*(\\S+)/);\n-          if (!name) continue;\n-          var argname = name[1] + (parsed.isOptional ? \"?\" : \"\");\n+            var name = m[2].slice(parsed.end).match(/^\\s*(\\[?\\s*)([^\\]\\s]+)\\s*(\\]?).*/);\n+            if (!name) continue;         \n+            var argname = name[2] + (parsed.isOptional || (name[1] === '[' && name[3] === ']') ? \"?\" : \"\");","path":"plugin/doc_comment.js","position":9,"original_position":9,"commit_id":"9724382ccd0ecd82605eae21a6b697adf881789b","original_commit_id":"9724382ccd0ecd82605eae21a6b697adf881789b","user":{"login":"marijnh","id":144427,"avatar_url":"https://avatars.githubusercontent.com/u/144427?v=3","gravatar_id":"","url":"https://api.github.com/users/marijnh","html_url":"https://github.com/marijnh","followers_url":"https://api.github.com/users/marijnh/followers","following_url":"https://api.github.com/users/marijnh/following{/other_user}","gists_url":"https://api.github.com/users/marijnh/gists{/gist_id}","starred_url":"https://api.github.com/users/marijnh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marijnh/subscriptions","organizations_url":"https://api.github.com/users/marijnh/orgs","repos_url":"https://api.github.com/users/marijnh/repos","events_url":"https://api.github.com/users/marijnh/events{/privacy}","received_events_url":"https://api.github.com/users/marijnh/received_events","type":"User","site_admin":false},"body":"This produces false:\r\n\r\n    /^\\s*(\\[?\\s*)([^\\]\\s]+)\\s*(\\]?).*/.exec(\"[ name]\")[0] == \"[\"\r\n\r\nSo my impression is that your code doesn't actually add the question mark when there is whitespace after the `[`.","created_at":"2014-12-12T14:35:19Z","updated_at":"2014-12-12T14:35:19Z","html_url":"https://github.com/marijnh/tern/pull/446#discussion_r21747009","pull_request_url":"https://api.github.com/repos/marijnh/tern/pulls/446","_links":{"self":{"href":"https://api.github.com/repos/marijnh/tern/pulls/comments/21747009"},"html":{"href":"https://github.com/marijnh/tern/pull/446#discussion_r21747009"},"pull_request":{"href":"https://api.github.com/repos/marijnh/tern/pulls/446"}}},"pull_request":{"url":"https://api.github.com/repos/marijnh/tern/pulls/446","id":25971943,"html_url":"https://github.com/marijnh/tern/pull/446","diff_url":"https://github.com/marijnh/tern/pull/446.diff","patch_url":"https://github.com/marijnh/tern/pull/446.patch","issue_url":"https://api.github.com/repos/marijnh/tern/issues/446","number":446,"state":"open","locked":false,"title":"Support \"square bracket around @param name inside JSDoc for optional params\" notation","user":{"login":"p-bakker","id":4981149,"avatar_url":"https://avatars.githubusercontent.com/u/4981149?v=3","gravatar_id":"","url":"https://api.github.com/users/p-bakker","html_url":"https://github.com/p-bakker","followers_url":"https://api.github.com/users/p-bakker/followers","following_url":"https://api.github.com/users/p-bakker/following{/other_user}","gists_url":"https://api.github.com/users/p-bakker/gists{/gist_id}","starred_url":"https://api.github.com/users/p-bakker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/p-bakker/subscriptions","organizations_url":"https://api.github.com/users/p-bakker/orgs","repos_url":"https://api.github.com/users/p-bakker/repos","events_url":"https://api.github.com/users/p-bakker/events{/privacy}","received_events_url":"https://api.github.com/users/p-bakker/received_events","type":"User","site_admin":false},"body":"\r\nImplements #445","created_at":"2014-12-12T13:05:05Z","updated_at":"2014-12-12T14:35:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"afd404fe4692d84b7c413abc60c1d3217366d434","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/marijnh/tern/pulls/446/commits","review_comments_url":"https://api.github.com/repos/marijnh/tern/pulls/446/comments","review_comment_url":"https://api.github.com/repos/marijnh/tern/pulls/comments/{number}","comments_url":"https://api.github.com/repos/marijnh/tern/issues/446/comments","statuses_url":"https://api.github.com/repos/marijnh/tern/statuses/9724382ccd0ecd82605eae21a6b697adf881789b","head":{"label":"p-bakker:master","ref":"master","sha":"9724382ccd0ecd82605eae21a6b697adf881789b","user":{"login":"p-bakker","id":4981149,"avatar_url":"https://avatars.githubusercontent.com/u/4981149?v=3","gravatar_id":"","url":"https://api.github.com/users/p-bakker","html_url":"https://github.com/p-bakker","followers_url":"https://api.github.com/users/p-bakker/followers","following_url":"https://api.github.com/users/p-bakker/following{/other_user}","gists_url":"https://api.github.com/users/p-bakker/gists{/gist_id}","starred_url":"https://api.github.com/users/p-bakker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/p-bakker/subscriptions","organizations_url":"https://api.github.com/users/p-bakker/orgs","repos_url":"https://api.github.com/users/p-bakker/repos","events_url":"https://api.github.com/users/p-bakker/events{/privacy}","received_events_url":"https://api.github.com/users/p-bakker/received_events","type":"User","site_admin":false},"repo":{"id":27217260,"name":"tern","full_name":"p-bakker/tern","owner":{"login":"p-bakker","id":4981149,"avatar_url":"https://avatars.githubusercontent.com/u/4981149?v=3","gravatar_id":"","url":"https://api.github.com/users/p-bakker","html_url":"https://github.com/p-bakker","followers_url":"https://api.github.com/users/p-bakker/followers","following_url":"https://api.github.com/users/p-bakker/following{/other_user}","gists_url":"https://api.github.com/users/p-bakker/gists{/gist_id}","starred_url":"https://api.github.com/users/p-bakker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/p-bakker/subscriptions","organizations_url":"https://api.github.com/users/p-bakker/orgs","repos_url":"https://api.github.com/users/p-bakker/repos","events_url":"https://api.github.com/users/p-bakker/events{/privacy}","received_events_url":"https://api.github.com/users/p-bakker/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/p-bakker/tern","description":"A JavaScript code analyzer for deep, cross-editor language support","fork":true,"url":"https://api.github.com/repos/p-bakker/tern","forks_url":"https://api.github.com/repos/p-bakker/tern/forks","keys_url":"https://api.github.com/repos/p-bakker/tern/keys{/key_id}","collaborators_url":"https://api.github.com/repos/p-bakker/tern/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/p-bakker/tern/teams","hooks_url":"https://api.github.com/repos/p-bakker/tern/hooks","issue_events_url":"https://api.github.com/repos/p-bakker/tern/issues/events{/number}","events_url":"https://api.github.com/repos/p-bakker/tern/events","assignees_url":"https://api.github.com/repos/p-bakker/tern/assignees{/user}","branches_url":"https://api.github.com/repos/p-bakker/tern/branches{/branch}","tags_url":"https://api.github.com/repos/p-bakker/tern/tags","blobs_url":"https://api.github.com/repos/p-bakker/tern/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/p-bakker/tern/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/p-bakker/tern/git/refs{/sha}","trees_url":"https://api.github.com/repos/p-bakker/tern/git/trees{/sha}","statuses_url":"https://api.github.com/repos/p-bakker/tern/statuses/{sha}","languages_url":"https://api.github.com/repos/p-bakker/tern/languages","stargazers_url":"https://api.github.com/repos/p-bakker/tern/stargazers","contributors_url":"https://api.github.com/repos/p-bakker/tern/contributors","subscribers_url":"https://api.github.com/repos/p-bakker/tern/subscribers","subscription_url":"https://api.github.com/repos/p-bakker/tern/subscription","commits_url":"https://api.github.com/repos/p-bakker/tern/commits{/sha}","git_commits_url":"https://api.github.com/repos/p-bakker/tern/git/commits{/sha}","comments_url":"https://api.github.com/repos/p-bakker/tern/comments{/number}","issue_comment_url":"https://api.github.com/repos/p-bakker/tern/issues/comments/{number}","contents_url":"https://api.github.com/repos/p-bakker/tern/contents/{+path}","compare_url":"https://api.github.com/repos/p-bakker/tern/compare/{base}...{head}","merges_url":"https://api.github.com/repos/p-bakker/tern/merges","archive_url":"https://api.github.com/repos/p-bakker/tern/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/p-bakker/tern/downloads","issues_url":"https://api.github.com/repos/p-bakker/tern/issues{/number}","pulls_url":"https://api.github.com/repos/p-bakker/tern/pulls{/number}","milestones_url":"https://api.github.com/repos/p-bakker/tern/milestones{/number}","notifications_url":"https://api.github.com/repos/p-bakker/tern/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/p-bakker/tern/labels{/name}","releases_url":"https://api.github.com/repos/p-bakker/tern/releases{/id}","created_at":"2014-11-27T09:06:18Z","updated_at":"2014-12-12T12:58:44Z","pushed_at":"2014-12-12T12:58:43Z","git_url":"git://github.com/p-bakker/tern.git","ssh_url":"git@github.com:p-bakker/tern.git","clone_url":"https://github.com/p-bakker/tern.git","svn_url":"https://github.com/p-bakker/tern","homepage":null,"size":2126,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"marijnh:master","ref":"master","sha":"8173dc2f29a2ac629b4ae7c668753661361d380a","user":{"login":"marijnh","id":144427,"avatar_url":"https://avatars.githubusercontent.com/u/144427?v=3","gravatar_id":"","url":"https://api.github.com/users/marijnh","html_url":"https://github.com/marijnh","followers_url":"https://api.github.com/users/marijnh/followers","following_url":"https://api.github.com/users/marijnh/following{/other_user}","gists_url":"https://api.github.com/users/marijnh/gists{/gist_id}","starred_url":"https://api.github.com/users/marijnh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marijnh/subscriptions","organizations_url":"https://api.github.com/users/marijnh/orgs","repos_url":"https://api.github.com/users/marijnh/repos","events_url":"https://api.github.com/users/marijnh/events{/privacy}","received_events_url":"https://api.github.com/users/marijnh/received_events","type":"User","site_admin":false},"repo":{"id":8635901,"name":"tern","full_name":"marijnh/tern","owner":{"login":"marijnh","id":144427,"avatar_url":"https://avatars.githubusercontent.com/u/144427?v=3","gravatar_id":"","url":"https://api.github.com/users/marijnh","html_url":"https://github.com/marijnh","followers_url":"https://api.github.com/users/marijnh/followers","following_url":"https://api.github.com/users/marijnh/following{/other_user}","gists_url":"https://api.github.com/users/marijnh/gists{/gist_id}","starred_url":"https://api.github.com/users/marijnh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marijnh/subscriptions","organizations_url":"https://api.github.com/users/marijnh/orgs","repos_url":"https://api.github.com/users/marijnh/repos","events_url":"https://api.github.com/users/marijnh/events{/privacy}","received_events_url":"https://api.github.com/users/marijnh/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/marijnh/tern","description":"A JavaScript code analyzer for deep, cross-editor language support","fork":false,"url":"https://api.github.com/repos/marijnh/tern","forks_url":"https://api.github.com/repos/marijnh/tern/forks","keys_url":"https://api.github.com/repos/marijnh/tern/keys{/key_id}","collaborators_url":"https://api.github.com/repos/marijnh/tern/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/marijnh/tern/teams","hooks_url":"https://api.github.com/repos/marijnh/tern/hooks","issue_events_url":"https://api.github.com/repos/marijnh/tern/issues/events{/number}","events_url":"https://api.github.com/repos/marijnh/tern/events","assignees_url":"https://api.github.com/repos/marijnh/tern/assignees{/user}","branches_url":"https://api.github.com/repos/marijnh/tern/branches{/branch}","tags_url":"https://api.github.com/repos/marijnh/tern/tags","blobs_url":"https://api.github.com/repos/marijnh/tern/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/marijnh/tern/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/marijnh/tern/git/refs{/sha}","trees_url":"https://api.github.com/repos/marijnh/tern/git/trees{/sha}","statuses_url":"https://api.github.com/repos/marijnh/tern/statuses/{sha}","languages_url":"https://api.github.com/repos/marijnh/tern/languages","stargazers_url":"https://api.github.com/repos/marijnh/tern/stargazers","contributors_url":"https://api.github.com/repos/marijnh/tern/contributors","subscribers_url":"https://api.github.com/repos/marijnh/tern/subscribers","subscription_url":"https://api.github.com/repos/marijnh/tern/subscription","commits_url":"https://api.github.com/repos/marijnh/tern/commits{/sha}","git_commits_url":"https://api.github.com/repos/marijnh/tern/git/commits{/sha}","comments_url":"https://api.github.com/repos/marijnh/tern/comments{/number}","issue_comment_url":"https://api.github.com/repos/marijnh/tern/issues/comments/{number}","contents_url":"https://api.github.com/repos/marijnh/tern/contents/{+path}","compare_url":"https://api.github.com/repos/marijnh/tern/compare/{base}...{head}","merges_url":"https://api.github.com/repos/marijnh/tern/merges","archive_url":"https://api.github.com/repos/marijnh/tern/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/marijnh/tern/downloads","issues_url":"https://api.github.com/repos/marijnh/tern/issues{/number}","pulls_url":"https://api.github.com/repos/marijnh/tern/pulls{/number}","milestones_url":"https://api.github.com/repos/marijnh/tern/milestones{/number}","notifications_url":"https://api.github.com/repos/marijnh/tern/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/marijnh/tern/labels{/name}","releases_url":"https://api.github.com/repos/marijnh/tern/releases{/id}","created_at":"2013-03-07T20:29:52Z","updated_at":"2014-12-12T11:03:38Z","pushed_at":"2014-12-09T16:44:22Z","git_url":"git://github.com/marijnh/tern.git","ssh_url":"git@github.com:marijnh/tern.git","clone_url":"https://github.com/marijnh/tern.git","svn_url":"https://github.com/marijnh/tern","homepage":null,"size":4828,"stargazers_count":1525,"watchers_count":1525,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":135,"mirror_url":null,"open_issues_count":73,"forks":135,"open_issues":73,"watchers":1525,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/marijnh/tern/pulls/446"},"html":{"href":"https://github.com/marijnh/tern/pull/446"},"issue":{"href":"https://api.github.com/repos/marijnh/tern/issues/446"},"comments":{"href":"https://api.github.com/repos/marijnh/tern/issues/446/comments"},"review_comments":{"href":"https://api.github.com/repos/marijnh/tern/pulls/446/comments"},"review_comment":{"href":"https://api.github.com/repos/marijnh/tern/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/marijnh/tern/pulls/446/commits"},"statuses":{"href":"https://api.github.com/repos/marijnh/tern/statuses/9724382ccd0ecd82605eae21a6b697adf881789b"}}}}