{"action":"created","comment":{"url":"https://api.github.com/repos/conorhastings/react-syntax-highlighter/pulls/comments/223240690","pull_request_review_id":162319523,"id":223240690,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMzI0MDY5MA==","diff_hunk":"@@ -0,0 +1,43 @@\n+import React from 'react';\n+import highlight from './highlight';\n+\n+const languages = [];\n+\n+export const registerLanguage = (_, language) => {\n+  if(ReactHighlightAsync.refractor) {\n+    return refractor.register(language);\n+  } else {\n+    languages.push(language);\n+  }\n+};\n+\n+export default class ReactHighlightAsync extends React.PureComponent {\n+  static refractor = null;\n+  static highlightInstance = (highlight(null, {}));\n+  static refractorPromise = null;\n+  \n+  static _loadRefractor() {","path":"src/prism-async.js","position":19,"original_position":19,"commit_id":"a9c92a4bb6a479e3ef4754c4ac3864150f56d303","original_commit_id":"14197ff6133d987430aa673a40341b33e1428f45","user":{"login":"marcodejongh","id":1107647,"node_id":"MDQ6VXNlcjExMDc2NDc=","avatar_url":"https://avatars0.githubusercontent.com/u/1107647?v=4","gravatar_id":"","url":"https://api.github.com/users/marcodejongh","html_url":"https://github.com/marcodejongh","followers_url":"https://api.github.com/users/marcodejongh/followers","following_url":"https://api.github.com/users/marcodejongh/following{/other_user}","gists_url":"https://api.github.com/users/marcodejongh/gists{/gist_id}","starred_url":"https://api.github.com/users/marcodejongh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcodejongh/subscriptions","organizations_url":"https://api.github.com/users/marcodejongh/orgs","repos_url":"https://api.github.com/users/marcodejongh/repos","events_url":"https://api.github.com/users/marcodejongh/events{/privacy}","received_events_url":"https://api.github.com/users/marcodejongh/received_events","type":"User","site_admin":false},"body":"I don't think there is a linter currently? maybe we should also add prettier?","created_at":"2018-10-08T02:56:19Z","updated_at":"2018-10-08T02:56:19Z","html_url":"https://github.com/conorhastings/react-syntax-highlighter/pull/135#discussion_r223240690","pull_request_url":"https://api.github.com/repos/conorhastings/react-syntax-highlighter/pulls/135","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/conorhastings/react-syntax-highlighter/pulls/comments/223240690"},"html":{"href":"https://github.com/conorhastings/react-syntax-highlighter/pull/135#discussion_r223240690"},"pull_request":{"href":"https://api.github.com/repos/conorhastings/react-syntax-highlighter/pulls/135"}},"in_reply_to_id":223236721},"pull_request":{"url":"https://api.github.com/repos/conorhastings/react-syntax-highlighter/pulls/135","id":219626362,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE5NjI2MzYy","html_url":"https://github.com/conorhastings/react-syntax-highlighter/pull/135","diff_url":"https://github.com/conorhastings/react-syntax-highlighter/pull/135.diff","patch_url":"https://github.com/conorhastings/react-syntax-highlighter/pull/135.patch","issue_url":"https://api.github.com/repos/conorhastings/react-syntax-highlighter/issues/135","number":135,"state":"open","locked":false,"title":"Async loaded version of prism light","user":{"login":"marcodejongh","id":1107647,"node_id":"MDQ6VXNlcjExMDc2NDc=","avatar_url":"https://avatars0.githubusercontent.com/u/1107647?v=4","gravatar_id":"","url":"https://api.github.com/users/marcodejongh","html_url":"https://github.com/marcodejongh","followers_url":"https://api.github.com/users/marcodejongh/followers","following_url":"https://api.github.com/users/marcodejongh/following{/other_user}","gists_url":"https://api.github.com/users/marcodejongh/gists{/gist_id}","starred_url":"https://api.github.com/users/marcodejongh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcodejongh/subscriptions","organizations_url":"https://api.github.com/users/marcodejongh/orgs","repos_url":"https://api.github.com/users/marcodejongh/repos","events_url":"https://api.github.com/users/marcodejongh/events{/privacy}","received_events_url":"https://api.github.com/users/marcodejongh/received_events","type":"User","site_admin":false},"body":"This PR is still in a rough state but submitting it now to get early feedback and learn if this has any chance of making it to master before pursuing it further. \r\n\r\nMy reasoning for this PR is that the syntax highlighting doesn't have to always be on the critical path. The loading experience of the introduced code split will be the code with line numbers, then once the code split is resolved it will add the colours. This reduces the critical path to rendering by at least 15kb gzipped. ","created_at":"2018-10-02T08:43:30Z","updated_at":"2018-10-08T02:56:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bcf2213cb0579e448716935dee54f4ca668ab777","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/conorhastings/react-syntax-highlighter/pulls/135/commits","review_comments_url":"https://api.github.com/repos/conorhastings/react-syntax-highlighter/pulls/135/comments","review_comment_url":"https://api.github.com/repos/conorhastings/react-syntax-highlighter/pulls/comments{/number}","comments_url":"https://api.github.com/repos/conorhastings/react-syntax-highlighter/issues/135/comments","statuses_url":"https://api.github.com/repos/conorhastings/react-syntax-highlighter/statuses/a9c92a4bb6a479e3ef4754c4ac3864150f56d303","head":{"label":"marcodejongh:AsyncPrism","ref":"AsyncPrism","sha":"a9c92a4bb6a479e3ef4754c4ac3864150f56d303","user":{"login":"marcodejongh","id":1107647,"node_id":"MDQ6VXNlcjExMDc2NDc=","avatar_url":"https://avatars0.githubusercontent.com/u/1107647?v=4","gravatar_id":"","url":"https://api.github.com/users/marcodejongh","html_url":"https://github.com/marcodejongh","followers_url":"https://api.github.com/users/marcodejongh/followers","following_url":"https://api.github.com/users/marcodejongh/following{/other_user}","gists_url":"https://api.github.com/users/marcodejongh/gists{/gist_id}","starred_url":"https://api.github.com/users/marcodejongh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcodejongh/subscriptions","organizations_url":"https://api.github.com/users/marcodejongh/orgs","repos_url":"https://api.github.com/users/marcodejongh/repos","events_url":"https://api.github.com/users/marcodejongh/events{/privacy}","received_events_url":"https://api.github.com/users/marcodejongh/received_events","type":"User","site_admin":false},"repo":{"id":151177442,"node_id":"MDEwOlJlcG9zaXRvcnkxNTExNzc0NDI=","name":"react-syntax-highlighter","full_name":"marcodejongh/react-syntax-highlighter","private":false,"owner":{"login":"marcodejongh","id":1107647,"node_id":"MDQ6VXNlcjExMDc2NDc=","avatar_url":"https://avatars0.githubusercontent.com/u/1107647?v=4","gravatar_id":"","url":"https://api.github.com/users/marcodejongh","html_url":"https://github.com/marcodejongh","followers_url":"https://api.github.com/users/marcodejongh/followers","following_url":"https://api.github.com/users/marcodejongh/following{/other_user}","gists_url":"https://api.github.com/users/marcodejongh/gists{/gist_id}","starred_url":"https://api.github.com/users/marcodejongh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcodejongh/subscriptions","organizations_url":"https://api.github.com/users/marcodejongh/orgs","repos_url":"https://api.github.com/users/marcodejongh/repos","events_url":"https://api.github.com/users/marcodejongh/events{/privacy}","received_events_url":"https://api.github.com/users/marcodejongh/received_events","type":"User","site_admin":false},"html_url":"https://github.com/marcodejongh/react-syntax-highlighter","description":"syntax highlighting component for react with prismjs or highlightjs ast using inline styles","fork":true,"url":"https://api.github.com/repos/marcodejongh/react-syntax-highlighter","forks_url":"https://api.github.com/repos/marcodejongh/react-syntax-highlighter/forks","keys_url":"https://api.github.com/repos/marcodejongh/react-syntax-highlighter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/marcodejongh/react-syntax-highlighter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/marcodejongh/react-syntax-highlighter/teams","hooks_url":"https://api.github.com/repos/marcodejongh/react-syntax-highlighter/hooks","issue_events_url":"https://api.github.com/repos/marcodejongh/react-syntax-highlighter/issues/events{/number}","events_url":"https://api.github.com/repos/marcodejongh/react-syntax-highlighter/events","assignees_url":"https://api.github.com/repos/marcodejongh/react-syntax-highlighter/assignees{/user}","branches_url":"https://api.github.com/repos/marcodejongh/react-syntax-highlighter/branches{/branch}","tags_url":"https://api.github.com/repos/marcodejongh/react-syntax-highlighter/tags","blobs_url":"https://api.github.com/repos/marcodejongh/react-syntax-highlighter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/marcodejongh/react-syntax-highlighter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/marcodejongh/react-syntax-highlighter/git/refs{/sha}","trees_url":"https://api.github.com/repos/marcodejongh/react-syntax-highlighter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/marcodejongh/react-syntax-highlighter/statuses/{sha}","languages_url":"https://api.github.com/repos/marcodejongh/react-syntax-highlighter/languages","stargazers_url":"https://api.github.com/repos/marcodejongh/react-syntax-highlighter/stargazers","contributors_url":"https://api.github.com/repos/marcodejongh/react-syntax-highlighter/contributors","subscribers_url":"https://api.github.com/repos/marcodejongh/react-syntax-highlighter/subscribers","subscription_url":"https://api.github.com/repos/marcodejongh/react-syntax-highlighter/subscription","commits_url":"https://api.github.com/repos/marcodejongh/react-syntax-highlighter/commits{/sha}","git_commits_url":"https://api.github.com/repos/marcodejongh/react-syntax-highlighter/git/commits{/sha}","comments_url":"https://api.github.com/repos/marcodejongh/react-syntax-highlighter/comments{/number}","issue_comment_url":"https://api.github.com/repos/marcodejongh/react-syntax-highlighter/issues/comments{/number}","contents_url":"https://api.github.com/repos/marcodejongh/react-syntax-highlighter/contents/{+path}","compare_url":"https://api.github.com/repos/marcodejongh/react-syntax-highlighter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/marcodejongh/react-syntax-highlighter/merges","archive_url":"https://api.github.com/repos/marcodejongh/react-syntax-highlighter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/marcodejongh/react-syntax-highlighter/downloads","issues_url":"https://api.github.com/repos/marcodejongh/react-syntax-highlighter/issues{/number}","pulls_url":"https://api.github.com/repos/marcodejongh/react-syntax-highlighter/pulls{/number}","milestones_url":"https://api.github.com/repos/marcodejongh/react-syntax-highlighter/milestones{/number}","notifications_url":"https://api.github.com/repos/marcodejongh/react-syntax-highlighter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/marcodejongh/react-syntax-highlighter/labels{/name}","releases_url":"https://api.github.com/repos/marcodejongh/react-syntax-highlighter/releases{/id}","deployments_url":"https://api.github.com/repos/marcodejongh/react-syntax-highlighter/deployments","created_at":"2018-10-02T00:04:36Z","updated_at":"2018-10-02T00:04:39Z","pushed_at":"2018-10-08T02:52:14Z","git_url":"git://github.com/marcodejongh/react-syntax-highlighter.git","ssh_url":"git@github.com:marcodejongh/react-syntax-highlighter.git","clone_url":"https://github.com/marcodejongh/react-syntax-highlighter.git","svn_url":"https://github.com/marcodejongh/react-syntax-highlighter","homepage":"http://conor.rodeo/react-syntax-highlighter/demo/","size":5717,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"conorhastings:master","ref":"master","sha":"ed7cada1ece6f443f2be5b610a5c4784723f1873","user":{"login":"conorhastings","id":8263298,"node_id":"MDQ6VXNlcjgyNjMyOTg=","avatar_url":"https://avatars2.githubusercontent.com/u/8263298?v=4","gravatar_id":"","url":"https://api.github.com/users/conorhastings","html_url":"https://github.com/conorhastings","followers_url":"https://api.github.com/users/conorhastings/followers","following_url":"https://api.github.com/users/conorhastings/following{/other_user}","gists_url":"https://api.github.com/users/conorhastings/gists{/gist_id}","starred_url":"https://api.github.com/users/conorhastings/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/conorhastings/subscriptions","organizations_url":"https://api.github.com/users/conorhastings/orgs","repos_url":"https://api.github.com/users/conorhastings/repos","events_url":"https://api.github.com/users/conorhastings/events{/privacy}","received_events_url":"https://api.github.com/users/conorhastings/received_events","type":"User","site_admin":false},"repo":{"id":50480643,"node_id":"MDEwOlJlcG9zaXRvcnk1MDQ4MDY0Mw==","name":"react-syntax-highlighter","full_name":"conorhastings/react-syntax-highlighter","private":false,"owner":{"login":"conorhastings","id":8263298,"node_id":"MDQ6VXNlcjgyNjMyOTg=","avatar_url":"https://avatars2.githubusercontent.com/u/8263298?v=4","gravatar_id":"","url":"https://api.github.com/users/conorhastings","html_url":"https://github.com/conorhastings","followers_url":"https://api.github.com/users/conorhastings/followers","following_url":"https://api.github.com/users/conorhastings/following{/other_user}","gists_url":"https://api.github.com/users/conorhastings/gists{/gist_id}","starred_url":"https://api.github.com/users/conorhastings/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/conorhastings/subscriptions","organizations_url":"https://api.github.com/users/conorhastings/orgs","repos_url":"https://api.github.com/users/conorhastings/repos","events_url":"https://api.github.com/users/conorhastings/events{/privacy}","received_events_url":"https://api.github.com/users/conorhastings/received_events","type":"User","site_admin":false},"html_url":"https://github.com/conorhastings/react-syntax-highlighter","description":"syntax highlighting component for react with prismjs or highlightjs ast using inline styles","fork":false,"url":"https://api.github.com/repos/conorhastings/react-syntax-highlighter","forks_url":"https://api.github.com/repos/conorhastings/react-syntax-highlighter/forks","keys_url":"https://api.github.com/repos/conorhastings/react-syntax-highlighter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/conorhastings/react-syntax-highlighter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/conorhastings/react-syntax-highlighter/teams","hooks_url":"https://api.github.com/repos/conorhastings/react-syntax-highlighter/hooks","issue_events_url":"https://api.github.com/repos/conorhastings/react-syntax-highlighter/issues/events{/number}","events_url":"https://api.github.com/repos/conorhastings/react-syntax-highlighter/events","assignees_url":"https://api.github.com/repos/conorhastings/react-syntax-highlighter/assignees{/user}","branches_url":"https://api.github.com/repos/conorhastings/react-syntax-highlighter/branches{/branch}","tags_url":"https://api.github.com/repos/conorhastings/react-syntax-highlighter/tags","blobs_url":"https://api.github.com/repos/conorhastings/react-syntax-highlighter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/conorhastings/react-syntax-highlighter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/conorhastings/react-syntax-highlighter/git/refs{/sha}","trees_url":"https://api.github.com/repos/conorhastings/react-syntax-highlighter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/conorhastings/react-syntax-highlighter/statuses/{sha}","languages_url":"https://api.github.com/repos/conorhastings/react-syntax-highlighter/languages","stargazers_url":"https://api.github.com/repos/conorhastings/react-syntax-highlighter/stargazers","contributors_url":"https://api.github.com/repos/conorhastings/react-syntax-highlighter/contributors","subscribers_url":"https://api.github.com/repos/conorhastings/react-syntax-highlighter/subscribers","subscription_url":"https://api.github.com/repos/conorhastings/react-syntax-highlighter/subscription","commits_url":"https://api.github.com/repos/conorhastings/react-syntax-highlighter/commits{/sha}","git_commits_url":"https://api.github.com/repos/conorhastings/react-syntax-highlighter/git/commits{/sha}","comments_url":"https://api.github.com/repos/conorhastings/react-syntax-highlighter/comments{/number}","issue_comment_url":"https://api.github.com/repos/conorhastings/react-syntax-highlighter/issues/comments{/number}","contents_url":"https://api.github.com/repos/conorhastings/react-syntax-highlighter/contents/{+path}","compare_url":"https://api.github.com/repos/conorhastings/react-syntax-highlighter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/conorhastings/react-syntax-highlighter/merges","archive_url":"https://api.github.com/repos/conorhastings/react-syntax-highlighter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/conorhastings/react-syntax-highlighter/downloads","issues_url":"https://api.github.com/repos/conorhastings/react-syntax-highlighter/issues{/number}","pulls_url":"https://api.github.com/repos/conorhastings/react-syntax-highlighter/pulls{/number}","milestones_url":"https://api.github.com/repos/conorhastings/react-syntax-highlighter/milestones{/number}","notifications_url":"https://api.github.com/repos/conorhastings/react-syntax-highlighter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/conorhastings/react-syntax-highlighter/labels{/name}","releases_url":"https://api.github.com/repos/conorhastings/react-syntax-highlighter/releases{/id}","deployments_url":"https://api.github.com/repos/conorhastings/react-syntax-highlighter/deployments","created_at":"2016-01-27T04:05:41Z","updated_at":"2018-10-07T12:34:03Z","pushed_at":"2018-10-08T02:52:15Z","git_url":"git://github.com/conorhastings/react-syntax-highlighter.git","ssh_url":"git@github.com:conorhastings/react-syntax-highlighter.git","clone_url":"https://github.com/conorhastings/react-syntax-highlighter.git","svn_url":"https://github.com/conorhastings/react-syntax-highlighter","homepage":"http://conor.rodeo/react-syntax-highlighter/demo/","size":5718,"stargazers_count":777,"watchers_count":777,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":68,"mirror_url":null,"archived":false,"open_issues_count":5,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":68,"open_issues":5,"watchers":777,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/conorhastings/react-syntax-highlighter/pulls/135"},"html":{"href":"https://github.com/conorhastings/react-syntax-highlighter/pull/135"},"issue":{"href":"https://api.github.com/repos/conorhastings/react-syntax-highlighter/issues/135"},"comments":{"href":"https://api.github.com/repos/conorhastings/react-syntax-highlighter/issues/135/comments"},"review_comments":{"href":"https://api.github.com/repos/conorhastings/react-syntax-highlighter/pulls/135/comments"},"review_comment":{"href":"https://api.github.com/repos/conorhastings/react-syntax-highlighter/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/conorhastings/react-syntax-highlighter/pulls/135/commits"},"statuses":{"href":"https://api.github.com/repos/conorhastings/react-syntax-highlighter/statuses/a9c92a4bb6a479e3ef4754c4ac3864150f56d303"}},"author_association":"NONE"}}
{"actor":{"display_login":"marcodejongh"}}