{"action":"created","comment":{"url":"https://api.github.com/repos/callemall/material-ui/pulls/comments/54529594","id":54529594,"diff_hunk":"@@ -65,14 +65,36 @@ function generateDescription(required, description, type) {\n   const jsDocText = parsed.description.replace(/\\n\\n/g, '<br>').replace(/\\n/g, ' ');\n \n   if (parsed.tags.some((tag) => tag.title === 'ignore')) return null;\n-\n   let signature = '';\n \n   if (type.name === 'func' && parsed.tags.length > 0) {\n+    // Split up the parsed objects into arguments and the returns parsed object. If there's no\n+    // returns parsed object (i.e., one with title being 'returns'), make one of type 'void'.\n+    const {parsedArgs, parsedReturns} = ((parsed) => {\n+      const parsedLength = parsed.tags.length;\n+      let parsedArgs = [];\n+      let parsedReturns;\n+\n+      if (parsed.tags[parsedLength - 1].title === 'returns') {\n+        parsedArgs = parsed.tags.slice(0, parsedLength - 1);\n+        parsedReturns = parsed.tags[parsedLength - 1];\n+      } else {\n+        parsedArgs = parsed.tags;\n+        parsedReturns = {type: {name: 'void'}};\n+      }\n+\n+      return {parsedArgs, parsedReturns};\n+    })(parsed);\n+\n     signature += '<br><br>**Signature:**<br>`function(';\n-    signature += parsed.tags.map((tag) => `${tag.name}: ${tag.type.name}`).join(', ');\n-    signature += ') => void`<br>';\n-    signature += parsed.tags.map((tag) => `*${tag.name}:* ${tag.description}`).join('<br>');\n+    signature += parsedArgs.map((tag) => `${tag.name}: ${tag.type.name}`).join(', ');\n+    signature += `) => ${parsedReturns.type.name && parsedReturns.type.name}` + '`<br>';","path":"docs/src/app/components/PropTypeDescription.jsx","position":31,"original_position":31,"commit_id":"6fcf1639c7cd1f73c9339d6c849535697504c1c1","original_commit_id":"6fcf1639c7cd1f73c9339d6c849535697504c1c1","user":{"login":"theosherry","id":8320854,"avatar_url":"https://avatars.githubusercontent.com/u/8320854?v=3","gravatar_id":"","url":"https://api.github.com/users/theosherry","html_url":"https://github.com/theosherry","followers_url":"https://api.github.com/users/theosherry/followers","following_url":"https://api.github.com/users/theosherry/following{/other_user}","gists_url":"https://api.github.com/users/theosherry/gists{/gist_id}","starred_url":"https://api.github.com/users/theosherry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theosherry/subscriptions","organizations_url":"https://api.github.com/users/theosherry/orgs","repos_url":"https://api.github.com/users/theosherry/repos","events_url":"https://api.github.com/users/theosherry/events{/privacy}","received_events_url":"https://api.github.com/users/theosherry/received_events","type":"User","site_admin":false},"body":"I'm getting a lint error for  not using templates here.","created_at":"2016-03-01T07:07:56Z","updated_at":"2016-03-01T07:07:56Z","html_url":"https://github.com/callemall/material-ui/pull/3542#discussion_r54529594","pull_request_url":"https://api.github.com/repos/callemall/material-ui/pulls/3542","_links":{"self":{"href":"https://api.github.com/repos/callemall/material-ui/pulls/comments/54529594"},"html":{"href":"https://github.com/callemall/material-ui/pull/3542#discussion_r54529594"},"pull_request":{"href":"https://api.github.com/repos/callemall/material-ui/pulls/3542"}}},"pull_request":{"url":"https://api.github.com/repos/callemall/material-ui/pulls/3542","id":61192061,"html_url":"https://github.com/callemall/material-ui/pull/3542","diff_url":"https://github.com/callemall/material-ui/pull/3542.diff","patch_url":"https://github.com/callemall/material-ui/pull/3542.patch","issue_url":"https://api.github.com/repos/callemall/material-ui/issues/3542","number":3542,"state":"open","locked":false,"title":"[PropTypeDescription] Adds @returns type and descriptions for functio…","user":{"login":"theosherry","id":8320854,"avatar_url":"https://avatars.githubusercontent.com/u/8320854?v=3","gravatar_id":"","url":"https://api.github.com/users/theosherry","html_url":"https://github.com/theosherry","followers_url":"https://api.github.com/users/theosherry/followers","following_url":"https://api.github.com/users/theosherry/following{/other_user}","gists_url":"https://api.github.com/users/theosherry/gists{/gist_id}","starred_url":"https://api.github.com/users/theosherry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theosherry/subscriptions","organizations_url":"https://api.github.com/users/theosherry/orgs","repos_url":"https://api.github.com/users/theosherry/repos","events_url":"https://api.github.com/users/theosherry/events{/privacy}","received_events_url":"https://api.github.com/users/theosherry/received_events","type":"User","site_admin":false},"body":"Hey, this PR is to help with finishing #3096 \r\n\r\nSome of the callback functions that need documentation have return values that should probably be documented. \r\n\r\n![code_description_included_cropped](https://cloud.githubusercontent.com/assets/8320854/13417780/df62d80a-df3c-11e5-87d6-e556971aa4c0.png)\r\n![docs_description_included_cropped](https://cloud.githubusercontent.com/assets/8320854/13417781/e1400044-df3c-11e5-8839-da8b820d7c84.png)\r\n\r\nWhen there's no `@returns` tag in the documentation, the function signature has a `void` return, exactly as it already works.  The description on the `@returns` tag is optional: \r\n![docs_no_description_cropped](https://cloud.githubusercontent.com/assets/8320854/13417876/be0b2ba2-df3d-11e5-9814-14dc811219ad.png)\r\n\r\n","created_at":"2016-03-01T04:41:56Z","updated_at":"2016-03-01T07:07:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"817cccfcd5d41de75fe354e1817aca5bb7d0f0af","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/callemall/material-ui/pulls/3542/commits","review_comments_url":"https://api.github.com/repos/callemall/material-ui/pulls/3542/comments","review_comment_url":"https://api.github.com/repos/callemall/material-ui/pulls/comments{/number}","comments_url":"https://api.github.com/repos/callemall/material-ui/issues/3542/comments","statuses_url":"https://api.github.com/repos/callemall/material-ui/statuses/6fcf1639c7cd1f73c9339d6c849535697504c1c1","head":{"label":"theosherry:parser_returns_support","ref":"parser_returns_support","sha":"6fcf1639c7cd1f73c9339d6c849535697504c1c1","user":{"login":"theosherry","id":8320854,"avatar_url":"https://avatars.githubusercontent.com/u/8320854?v=3","gravatar_id":"","url":"https://api.github.com/users/theosherry","html_url":"https://github.com/theosherry","followers_url":"https://api.github.com/users/theosherry/followers","following_url":"https://api.github.com/users/theosherry/following{/other_user}","gists_url":"https://api.github.com/users/theosherry/gists{/gist_id}","starred_url":"https://api.github.com/users/theosherry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theosherry/subscriptions","organizations_url":"https://api.github.com/users/theosherry/orgs","repos_url":"https://api.github.com/users/theosherry/repos","events_url":"https://api.github.com/users/theosherry/events{/privacy}","received_events_url":"https://api.github.com/users/theosherry/received_events","type":"User","site_admin":false},"repo":{"id":51014954,"name":"material-ui","full_name":"theosherry/material-ui","owner":{"login":"theosherry","id":8320854,"avatar_url":"https://avatars.githubusercontent.com/u/8320854?v=3","gravatar_id":"","url":"https://api.github.com/users/theosherry","html_url":"https://github.com/theosherry","followers_url":"https://api.github.com/users/theosherry/followers","following_url":"https://api.github.com/users/theosherry/following{/other_user}","gists_url":"https://api.github.com/users/theosherry/gists{/gist_id}","starred_url":"https://api.github.com/users/theosherry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theosherry/subscriptions","organizations_url":"https://api.github.com/users/theosherry/orgs","repos_url":"https://api.github.com/users/theosherry/repos","events_url":"https://api.github.com/users/theosherry/events{/privacy}","received_events_url":"https://api.github.com/users/theosherry/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/theosherry/material-ui","description":"React Components that Implement Google's Material Design.","fork":true,"url":"https://api.github.com/repos/theosherry/material-ui","forks_url":"https://api.github.com/repos/theosherry/material-ui/forks","keys_url":"https://api.github.com/repos/theosherry/material-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/theosherry/material-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/theosherry/material-ui/teams","hooks_url":"https://api.github.com/repos/theosherry/material-ui/hooks","issue_events_url":"https://api.github.com/repos/theosherry/material-ui/issues/events{/number}","events_url":"https://api.github.com/repos/theosherry/material-ui/events","assignees_url":"https://api.github.com/repos/theosherry/material-ui/assignees{/user}","branches_url":"https://api.github.com/repos/theosherry/material-ui/branches{/branch}","tags_url":"https://api.github.com/repos/theosherry/material-ui/tags","blobs_url":"https://api.github.com/repos/theosherry/material-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/theosherry/material-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/theosherry/material-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/theosherry/material-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/theosherry/material-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/theosherry/material-ui/languages","stargazers_url":"https://api.github.com/repos/theosherry/material-ui/stargazers","contributors_url":"https://api.github.com/repos/theosherry/material-ui/contributors","subscribers_url":"https://api.github.com/repos/theosherry/material-ui/subscribers","subscription_url":"https://api.github.com/repos/theosherry/material-ui/subscription","commits_url":"https://api.github.com/repos/theosherry/material-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/theosherry/material-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/theosherry/material-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/theosherry/material-ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/theosherry/material-ui/contents/{+path}","compare_url":"https://api.github.com/repos/theosherry/material-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/theosherry/material-ui/merges","archive_url":"https://api.github.com/repos/theosherry/material-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/theosherry/material-ui/downloads","issues_url":"https://api.github.com/repos/theosherry/material-ui/issues{/number}","pulls_url":"https://api.github.com/repos/theosherry/material-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/theosherry/material-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/theosherry/material-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/theosherry/material-ui/labels{/name}","releases_url":"https://api.github.com/repos/theosherry/material-ui/releases{/id}","deployments_url":"https://api.github.com/repos/theosherry/material-ui/deployments","created_at":"2016-02-03T16:55:45Z","updated_at":"2016-02-03T16:55:46Z","pushed_at":"2016-03-01T04:17:07Z","git_url":"git://github.com/theosherry/material-ui.git","ssh_url":"git@github.com:theosherry/material-ui.git","clone_url":"https://github.com/theosherry/material-ui.git","svn_url":"https://github.com/theosherry/material-ui","homepage":"http://www.material-ui.com","size":47410,"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":"callemall:master","ref":"master","sha":"7df02055521ac7127bc39df73a9fc7318c0c97dd","user":{"login":"callemall","id":1262264,"avatar_url":"https://avatars.githubusercontent.com/u/1262264?v=3","gravatar_id":"","url":"https://api.github.com/users/callemall","html_url":"https://github.com/callemall","followers_url":"https://api.github.com/users/callemall/followers","following_url":"https://api.github.com/users/callemall/following{/other_user}","gists_url":"https://api.github.com/users/callemall/gists{/gist_id}","starred_url":"https://api.github.com/users/callemall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/callemall/subscriptions","organizations_url":"https://api.github.com/users/callemall/orgs","repos_url":"https://api.github.com/users/callemall/repos","events_url":"https://api.github.com/users/callemall/events{/privacy}","received_events_url":"https://api.github.com/users/callemall/received_events","type":"Organization","site_admin":false},"repo":{"id":23083156,"name":"material-ui","full_name":"callemall/material-ui","owner":{"login":"callemall","id":1262264,"avatar_url":"https://avatars.githubusercontent.com/u/1262264?v=3","gravatar_id":"","url":"https://api.github.com/users/callemall","html_url":"https://github.com/callemall","followers_url":"https://api.github.com/users/callemall/followers","following_url":"https://api.github.com/users/callemall/following{/other_user}","gists_url":"https://api.github.com/users/callemall/gists{/gist_id}","starred_url":"https://api.github.com/users/callemall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/callemall/subscriptions","organizations_url":"https://api.github.com/users/callemall/orgs","repos_url":"https://api.github.com/users/callemall/repos","events_url":"https://api.github.com/users/callemall/events{/privacy}","received_events_url":"https://api.github.com/users/callemall/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/callemall/material-ui","description":"React Components that Implement Google's Material Design.","fork":false,"url":"https://api.github.com/repos/callemall/material-ui","forks_url":"https://api.github.com/repos/callemall/material-ui/forks","keys_url":"https://api.github.com/repos/callemall/material-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/callemall/material-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/callemall/material-ui/teams","hooks_url":"https://api.github.com/repos/callemall/material-ui/hooks","issue_events_url":"https://api.github.com/repos/callemall/material-ui/issues/events{/number}","events_url":"https://api.github.com/repos/callemall/material-ui/events","assignees_url":"https://api.github.com/repos/callemall/material-ui/assignees{/user}","branches_url":"https://api.github.com/repos/callemall/material-ui/branches{/branch}","tags_url":"https://api.github.com/repos/callemall/material-ui/tags","blobs_url":"https://api.github.com/repos/callemall/material-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/callemall/material-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/callemall/material-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/callemall/material-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/callemall/material-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/callemall/material-ui/languages","stargazers_url":"https://api.github.com/repos/callemall/material-ui/stargazers","contributors_url":"https://api.github.com/repos/callemall/material-ui/contributors","subscribers_url":"https://api.github.com/repos/callemall/material-ui/subscribers","subscription_url":"https://api.github.com/repos/callemall/material-ui/subscription","commits_url":"https://api.github.com/repos/callemall/material-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/callemall/material-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/callemall/material-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/callemall/material-ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/callemall/material-ui/contents/{+path}","compare_url":"https://api.github.com/repos/callemall/material-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/callemall/material-ui/merges","archive_url":"https://api.github.com/repos/callemall/material-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/callemall/material-ui/downloads","issues_url":"https://api.github.com/repos/callemall/material-ui/issues{/number}","pulls_url":"https://api.github.com/repos/callemall/material-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/callemall/material-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/callemall/material-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/callemall/material-ui/labels{/name}","releases_url":"https://api.github.com/repos/callemall/material-ui/releases{/id}","deployments_url":"https://api.github.com/repos/callemall/material-ui/deployments","created_at":"2014-08-18T19:11:54Z","updated_at":"2016-03-01T06:07:22Z","pushed_at":"2016-03-01T04:41:57Z","git_url":"git://github.com/callemall/material-ui.git","ssh_url":"git@github.com:callemall/material-ui.git","clone_url":"https://github.com/callemall/material-ui.git","svn_url":"https://github.com/callemall/material-ui","homepage":"http://www.material-ui.com","size":57571,"stargazers_count":14136,"watchers_count":14136,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2398,"mirror_url":null,"open_issues_count":556,"forks":2398,"open_issues":556,"watchers":14136,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/callemall/material-ui/pulls/3542"},"html":{"href":"https://github.com/callemall/material-ui/pull/3542"},"issue":{"href":"https://api.github.com/repos/callemall/material-ui/issues/3542"},"comments":{"href":"https://api.github.com/repos/callemall/material-ui/issues/3542/comments"},"review_comments":{"href":"https://api.github.com/repos/callemall/material-ui/pulls/3542/comments"},"review_comment":{"href":"https://api.github.com/repos/callemall/material-ui/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/callemall/material-ui/pulls/3542/commits"},"statuses":{"href":"https://api.github.com/repos/callemall/material-ui/statuses/6fcf1639c7cd1f73c9339d6c849535697504c1c1"}}}}