{"action":"created","comment":{"url":"https://api.github.com/repos/vuejs/vuepress/pulls/comments/184622653","pull_request_review_id":115856619,"id":184622653,"diff_hunk":"@@ -0,0 +1,29 @@\n+const parseEmojis = str => {\n+  const emojiData = require('markdown-it-emoji/lib/data/full.json')\n+  return str.replace(/:(.+?):/g, (placeholder, key) => emojiData[key] || placeholder)\n+}\n+\n+const unescapeHtml = html => html\n+  .replace(/&quot;/g, '\"')\n+  .replace(/&#39;/g, '\\'')\n+  .replace(/&#x3A;/g, ':')\n+  .replace(/&lt;/g, '<')\n+  .replace(/&gt;/g, '>')\n+\n+const removeMarkdownToken = str => str\n+  .replace(/`(.*)`/, '$1')  // ``\n+  .replace(/\\[(.*)\\]\\(.*\\)/, '$1')  // []()\n+  .replace(/\\*\\*(.*)\\*\\*/, '$1')  // **\n+  .replace(/\\*(.*)\\*/, '$1')  // *\n+  .replace(/_(.*)_/, '$1')  // _\n+\n+// put here to avoid circular references\n+const compose = (...processors) => {","path":"lib/util/parseHeaders.js","position":21,"original_position":21,"commit_id":"3116afe905ec3e712e3a3655e4b40b0bb1d63c12","original_commit_id":"3116afe905ec3e712e3a3655e4b40b0bb1d63c12","user":{"login":"ycmjason","id":1251825,"avatar_url":"https://avatars3.githubusercontent.com/u/1251825?v=4","gravatar_id":"","url":"https://api.github.com/users/ycmjason","html_url":"https://github.com/ycmjason","followers_url":"https://api.github.com/users/ycmjason/followers","following_url":"https://api.github.com/users/ycmjason/following{/other_user}","gists_url":"https://api.github.com/users/ycmjason/gists{/gist_id}","starred_url":"https://api.github.com/users/ycmjason/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ycmjason/subscriptions","organizations_url":"https://api.github.com/users/ycmjason/orgs","repos_url":"https://api.github.com/users/ycmjason/repos","events_url":"https://api.github.com/users/ycmjason/events{/privacy}","received_events_url":"https://api.github.com/users/ycmjason/received_events","type":"User","site_admin":false},"body":"The checking of the `processors.length` seems unnecessary. Perhaps something like this?\r\n\r\n```js\r\nconst compose = (...processors) => {\r\n  return processors.reduce((prev, next) => {\r\n    return (...args) => next(prev(...args))\r\n  }, x => x)\r\n}\r\n```\r\n\r\nOr\r\n\r\n```js\r\nconst compose = (...processors) => {\r\n  return [\r\n    x => x,\r\n    ...processors\r\n  ].reduce((prev, next) => {\r\n    return (...args) => next(prev(...args))\r\n  })\r\n}\r\n```","created_at":"2018-04-27T08:25:42Z","updated_at":"2018-04-27T08:35:16Z","html_url":"https://github.com/vuejs/vuepress/pull/271#discussion_r184622653","pull_request_url":"https://api.github.com/repos/vuejs/vuepress/pulls/271","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/vuejs/vuepress/pulls/comments/184622653"},"html":{"href":"https://github.com/vuejs/vuepress/pull/271#discussion_r184622653"},"pull_request":{"href":"https://api.github.com/repos/vuejs/vuepress/pulls/271"}}},"pull_request":{"url":"https://api.github.com/repos/vuejs/vuepress/pulls/271","id":184487042,"html_url":"https://github.com/vuejs/vuepress/pull/271","diff_url":"https://github.com/vuejs/vuepress/pull/271.diff","patch_url":"https://github.com/vuejs/vuepress/pull/271.patch","issue_url":"https://api.github.com/repos/vuejs/vuepress/issues/271","number":271,"state":"open","locked":false,"title":"feat: header extraction improvement (close: #238)","user":{"login":"ulivz","id":23133919,"avatar_url":"https://avatars1.githubusercontent.com/u/23133919?v=4","gravatar_id":"","url":"https://api.github.com/users/ulivz","html_url":"https://github.com/ulivz","followers_url":"https://api.github.com/users/ulivz/followers","following_url":"https://api.github.com/users/ulivz/following{/other_user}","gists_url":"https://api.github.com/users/ulivz/gists{/gist_id}","starred_url":"https://api.github.com/users/ulivz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ulivz/subscriptions","organizations_url":"https://api.github.com/users/ulivz/orgs","repos_url":"https://api.github.com/users/ulivz/repos","events_url":"https://api.github.com/users/ulivz/events{/privacy}","received_events_url":"https://api.github.com/users/ulivz/received_events","type":"User","site_admin":false},"body":"# Summary\r\n\r\nFixed: #238 \r\nTest Header:\r\n\r\n```md\r\n## `How` [It](/app/) &lt;Works&gt; **app** _italic_ *italic*\r\n```\r\n\r\n# Snapshot\r\n\r\n### Before\r\n\r\n![image](https://user-images.githubusercontent.com/23133919/39336449-2d1f6cc4-49ea-11e8-9dd5-9c9fad399f16.png)\r\n\r\n### After\r\n\r\n![image](https://user-images.githubusercontent.com/23133919/39336482-4fbe3044-49ea-11e8-97ab-8d785ef1ea7b.png)\r\n\r\n\r\n","created_at":"2018-04-26T23:10:11Z","updated_at":"2018-04-27T08:35:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2c4618c653499fb45e6f1071e59314c8c8f01342","assignee":null,"assignees":[],"requested_reviewers":[{"login":"yyx990803","id":499550,"avatar_url":"https://avatars1.githubusercontent.com/u/499550?v=4","gravatar_id":"","url":"https://api.github.com/users/yyx990803","html_url":"https://github.com/yyx990803","followers_url":"https://api.github.com/users/yyx990803/followers","following_url":"https://api.github.com/users/yyx990803/following{/other_user}","gists_url":"https://api.github.com/users/yyx990803/gists{/gist_id}","starred_url":"https://api.github.com/users/yyx990803/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yyx990803/subscriptions","organizations_url":"https://api.github.com/users/yyx990803/orgs","repos_url":"https://api.github.com/users/yyx990803/repos","events_url":"https://api.github.com/users/yyx990803/events{/privacy}","received_events_url":"https://api.github.com/users/yyx990803/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":907995432,"url":"https://api.github.com/repos/vuejs/vuepress/labels/semver:%20minor","name":"semver: minor","color":"3fd3d3","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/vuejs/vuepress/pulls/271/commits","review_comments_url":"https://api.github.com/repos/vuejs/vuepress/pulls/271/comments","review_comment_url":"https://api.github.com/repos/vuejs/vuepress/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vuejs/vuepress/issues/271/comments","statuses_url":"https://api.github.com/repos/vuejs/vuepress/statuses/3116afe905ec3e712e3a3655e4b40b0bb1d63c12","head":{"label":"vuejs:238-header-extraction-improvement","ref":"238-header-extraction-improvement","sha":"3116afe905ec3e712e3a3655e4b40b0bb1d63c12","user":{"login":"vuejs","id":6128107,"avatar_url":"https://avatars1.githubusercontent.com/u/6128107?v=4","gravatar_id":"","url":"https://api.github.com/users/vuejs","html_url":"https://github.com/vuejs","followers_url":"https://api.github.com/users/vuejs/followers","following_url":"https://api.github.com/users/vuejs/following{/other_user}","gists_url":"https://api.github.com/users/vuejs/gists{/gist_id}","starred_url":"https://api.github.com/users/vuejs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vuejs/subscriptions","organizations_url":"https://api.github.com/users/vuejs/orgs","repos_url":"https://api.github.com/users/vuejs/repos","events_url":"https://api.github.com/users/vuejs/events{/privacy}","received_events_url":"https://api.github.com/users/vuejs/received_events","type":"Organization","site_admin":false},"repo":{"id":128237146,"name":"vuepress","full_name":"vuejs/vuepress","owner":{"login":"vuejs","id":6128107,"avatar_url":"https://avatars1.githubusercontent.com/u/6128107?v=4","gravatar_id":"","url":"https://api.github.com/users/vuejs","html_url":"https://github.com/vuejs","followers_url":"https://api.github.com/users/vuejs/followers","following_url":"https://api.github.com/users/vuejs/following{/other_user}","gists_url":"https://api.github.com/users/vuejs/gists{/gist_id}","starred_url":"https://api.github.com/users/vuejs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vuejs/subscriptions","organizations_url":"https://api.github.com/users/vuejs/orgs","repos_url":"https://api.github.com/users/vuejs/repos","events_url":"https://api.github.com/users/vuejs/events{/privacy}","received_events_url":"https://api.github.com/users/vuejs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vuejs/vuepress","description":"📝 Minimalistic Vue-powered static site generator","fork":false,"url":"https://api.github.com/repos/vuejs/vuepress","forks_url":"https://api.github.com/repos/vuejs/vuepress/forks","keys_url":"https://api.github.com/repos/vuejs/vuepress/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vuejs/vuepress/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vuejs/vuepress/teams","hooks_url":"https://api.github.com/repos/vuejs/vuepress/hooks","issue_events_url":"https://api.github.com/repos/vuejs/vuepress/issues/events{/number}","events_url":"https://api.github.com/repos/vuejs/vuepress/events","assignees_url":"https://api.github.com/repos/vuejs/vuepress/assignees{/user}","branches_url":"https://api.github.com/repos/vuejs/vuepress/branches{/branch}","tags_url":"https://api.github.com/repos/vuejs/vuepress/tags","blobs_url":"https://api.github.com/repos/vuejs/vuepress/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vuejs/vuepress/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vuejs/vuepress/git/refs{/sha}","trees_url":"https://api.github.com/repos/vuejs/vuepress/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vuejs/vuepress/statuses/{sha}","languages_url":"https://api.github.com/repos/vuejs/vuepress/languages","stargazers_url":"https://api.github.com/repos/vuejs/vuepress/stargazers","contributors_url":"https://api.github.com/repos/vuejs/vuepress/contributors","subscribers_url":"https://api.github.com/repos/vuejs/vuepress/subscribers","subscription_url":"https://api.github.com/repos/vuejs/vuepress/subscription","commits_url":"https://api.github.com/repos/vuejs/vuepress/commits{/sha}","git_commits_url":"https://api.github.com/repos/vuejs/vuepress/git/commits{/sha}","comments_url":"https://api.github.com/repos/vuejs/vuepress/comments{/number}","issue_comment_url":"https://api.github.com/repos/vuejs/vuepress/issues/comments{/number}","contents_url":"https://api.github.com/repos/vuejs/vuepress/contents/{+path}","compare_url":"https://api.github.com/repos/vuejs/vuepress/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vuejs/vuepress/merges","archive_url":"https://api.github.com/repos/vuejs/vuepress/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vuejs/vuepress/downloads","issues_url":"https://api.github.com/repos/vuejs/vuepress/issues{/number}","pulls_url":"https://api.github.com/repos/vuejs/vuepress/pulls{/number}","milestones_url":"https://api.github.com/repos/vuejs/vuepress/milestones{/number}","notifications_url":"https://api.github.com/repos/vuejs/vuepress/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vuejs/vuepress/labels{/name}","releases_url":"https://api.github.com/repos/vuejs/vuepress/releases{/id}","deployments_url":"https://api.github.com/repos/vuejs/vuepress/deployments","created_at":"2018-04-05T16:58:38Z","updated_at":"2018-04-27T08:34:58Z","pushed_at":"2018-04-27T06:19:56Z","git_url":"git://github.com/vuejs/vuepress.git","ssh_url":"git@github.com:vuejs/vuepress.git","clone_url":"https://github.com/vuejs/vuepress.git","svn_url":"https://github.com/vuejs/vuepress","homepage":"https://vuepress.vuejs.org/","size":2875,"stargazers_count":5989,"watchers_count":5989,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":397,"mirror_url":null,"archived":false,"open_issues_count":25,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":397,"open_issues":25,"watchers":5989,"default_branch":"master"}},"base":{"label":"vuejs:master","ref":"master","sha":"c01a18c1c0ae26e6615a475564232dfd7f047776","user":{"login":"vuejs","id":6128107,"avatar_url":"https://avatars1.githubusercontent.com/u/6128107?v=4","gravatar_id":"","url":"https://api.github.com/users/vuejs","html_url":"https://github.com/vuejs","followers_url":"https://api.github.com/users/vuejs/followers","following_url":"https://api.github.com/users/vuejs/following{/other_user}","gists_url":"https://api.github.com/users/vuejs/gists{/gist_id}","starred_url":"https://api.github.com/users/vuejs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vuejs/subscriptions","organizations_url":"https://api.github.com/users/vuejs/orgs","repos_url":"https://api.github.com/users/vuejs/repos","events_url":"https://api.github.com/users/vuejs/events{/privacy}","received_events_url":"https://api.github.com/users/vuejs/received_events","type":"Organization","site_admin":false},"repo":{"id":128237146,"name":"vuepress","full_name":"vuejs/vuepress","owner":{"login":"vuejs","id":6128107,"avatar_url":"https://avatars1.githubusercontent.com/u/6128107?v=4","gravatar_id":"","url":"https://api.github.com/users/vuejs","html_url":"https://github.com/vuejs","followers_url":"https://api.github.com/users/vuejs/followers","following_url":"https://api.github.com/users/vuejs/following{/other_user}","gists_url":"https://api.github.com/users/vuejs/gists{/gist_id}","starred_url":"https://api.github.com/users/vuejs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vuejs/subscriptions","organizations_url":"https://api.github.com/users/vuejs/orgs","repos_url":"https://api.github.com/users/vuejs/repos","events_url":"https://api.github.com/users/vuejs/events{/privacy}","received_events_url":"https://api.github.com/users/vuejs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vuejs/vuepress","description":"📝 Minimalistic Vue-powered static site generator","fork":false,"url":"https://api.github.com/repos/vuejs/vuepress","forks_url":"https://api.github.com/repos/vuejs/vuepress/forks","keys_url":"https://api.github.com/repos/vuejs/vuepress/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vuejs/vuepress/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vuejs/vuepress/teams","hooks_url":"https://api.github.com/repos/vuejs/vuepress/hooks","issue_events_url":"https://api.github.com/repos/vuejs/vuepress/issues/events{/number}","events_url":"https://api.github.com/repos/vuejs/vuepress/events","assignees_url":"https://api.github.com/repos/vuejs/vuepress/assignees{/user}","branches_url":"https://api.github.com/repos/vuejs/vuepress/branches{/branch}","tags_url":"https://api.github.com/repos/vuejs/vuepress/tags","blobs_url":"https://api.github.com/repos/vuejs/vuepress/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vuejs/vuepress/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vuejs/vuepress/git/refs{/sha}","trees_url":"https://api.github.com/repos/vuejs/vuepress/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vuejs/vuepress/statuses/{sha}","languages_url":"https://api.github.com/repos/vuejs/vuepress/languages","stargazers_url":"https://api.github.com/repos/vuejs/vuepress/stargazers","contributors_url":"https://api.github.com/repos/vuejs/vuepress/contributors","subscribers_url":"https://api.github.com/repos/vuejs/vuepress/subscribers","subscription_url":"https://api.github.com/repos/vuejs/vuepress/subscription","commits_url":"https://api.github.com/repos/vuejs/vuepress/commits{/sha}","git_commits_url":"https://api.github.com/repos/vuejs/vuepress/git/commits{/sha}","comments_url":"https://api.github.com/repos/vuejs/vuepress/comments{/number}","issue_comment_url":"https://api.github.com/repos/vuejs/vuepress/issues/comments{/number}","contents_url":"https://api.github.com/repos/vuejs/vuepress/contents/{+path}","compare_url":"https://api.github.com/repos/vuejs/vuepress/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vuejs/vuepress/merges","archive_url":"https://api.github.com/repos/vuejs/vuepress/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vuejs/vuepress/downloads","issues_url":"https://api.github.com/repos/vuejs/vuepress/issues{/number}","pulls_url":"https://api.github.com/repos/vuejs/vuepress/pulls{/number}","milestones_url":"https://api.github.com/repos/vuejs/vuepress/milestones{/number}","notifications_url":"https://api.github.com/repos/vuejs/vuepress/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vuejs/vuepress/labels{/name}","releases_url":"https://api.github.com/repos/vuejs/vuepress/releases{/id}","deployments_url":"https://api.github.com/repos/vuejs/vuepress/deployments","created_at":"2018-04-05T16:58:38Z","updated_at":"2018-04-27T08:34:58Z","pushed_at":"2018-04-27T06:19:56Z","git_url":"git://github.com/vuejs/vuepress.git","ssh_url":"git@github.com:vuejs/vuepress.git","clone_url":"https://github.com/vuejs/vuepress.git","svn_url":"https://github.com/vuejs/vuepress","homepage":"https://vuepress.vuejs.org/","size":2875,"stargazers_count":5989,"watchers_count":5989,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":397,"mirror_url":null,"archived":false,"open_issues_count":25,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":397,"open_issues":25,"watchers":5989,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vuejs/vuepress/pulls/271"},"html":{"href":"https://github.com/vuejs/vuepress/pull/271"},"issue":{"href":"https://api.github.com/repos/vuejs/vuepress/issues/271"},"comments":{"href":"https://api.github.com/repos/vuejs/vuepress/issues/271/comments"},"review_comments":{"href":"https://api.github.com/repos/vuejs/vuepress/pulls/271/comments"},"review_comment":{"href":"https://api.github.com/repos/vuejs/vuepress/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vuejs/vuepress/pulls/271/commits"},"statuses":{"href":"https://api.github.com/repos/vuejs/vuepress/statuses/3116afe905ec3e712e3a3655e4b40b0bb1d63c12"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"ycmjason"}}