{"action":"closed","number":963,"pull_request":{"url":"https://api.github.com/repos/isagalaev/highlight.js/pulls/963","id":48562909,"html_url":"https://github.com/isagalaev/highlight.js/pull/963","diff_url":"https://github.com/isagalaev/highlight.js/pull/963.diff","patch_url":"https://github.com/isagalaev/highlight.js/pull/963.patch","issue_url":"https://api.github.com/repos/isagalaev/highlight.js/issues/963","number":963,"state":"closed","locked":false,"title":"Add support for use inside of a web worker","user":{"login":"frigus02","id":3579251,"avatar_url":"https://avatars.githubusercontent.com/u/3579251?v=3","gravatar_id":"","url":"https://api.github.com/users/frigus02","html_url":"https://github.com/frigus02","followers_url":"https://api.github.com/users/frigus02/followers","following_url":"https://api.github.com/users/frigus02/following{/other_user}","gists_url":"https://api.github.com/users/frigus02/gists{/gist_id}","starred_url":"https://api.github.com/users/frigus02/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frigus02/subscriptions","organizations_url":"https://api.github.com/users/frigus02/orgs","repos_url":"https://api.github.com/users/frigus02/repos","events_url":"https://api.github.com/users/frigus02/events{/privacy}","received_events_url":"https://api.github.com/users/frigus02/received_events","type":"User","site_admin":false},"body":"I want to use highlight.js inside of a web worker, because I need to highlight large code blocks and don't want to do this on the main thread. All it takes to support web workers is make a small change in the factory function.\r\n\r\nWIth this change I can just use highlight.js in my worker:\r\n\r\n```javascript\r\nimportScripts('bower_components/highlightjs/highlight.pack.min.js');\r\n\r\nself.onmessage = function (e) {\r\n    var result = hljs.highlight(e.data.language, e.data.code);\r\n    return result.value;\r\n};\r\n```\r\n\r\nThis works great for me.","created_at":"2015-10-23T10:12:54Z","updated_at":"2015-10-24T13:26:03Z","closed_at":"2015-10-24T13:26:03Z","merged_at":"2015-10-24T13:26:03Z","merge_commit_sha":"85412e5e768044578c52ba0589902cd25674b422","assignee":{"login":"Sannis","id":77367,"avatar_url":"https://avatars.githubusercontent.com/u/77367?v=3","gravatar_id":"","url":"https://api.github.com/users/Sannis","html_url":"https://github.com/Sannis","followers_url":"https://api.github.com/users/Sannis/followers","following_url":"https://api.github.com/users/Sannis/following{/other_user}","gists_url":"https://api.github.com/users/Sannis/gists{/gist_id}","starred_url":"https://api.github.com/users/Sannis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sannis/subscriptions","organizations_url":"https://api.github.com/users/Sannis/orgs","repos_url":"https://api.github.com/users/Sannis/repos","events_url":"https://api.github.com/users/Sannis/events{/privacy}","received_events_url":"https://api.github.com/users/Sannis/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/isagalaev/highlight.js/milestones/12","html_url":"https://github.com/isagalaev/highlight.js/milestones/8.10","labels_url":"https://api.github.com/repos/isagalaev/highlight.js/milestones/12/labels","id":1364923,"number":12,"title":"8.10","description":"","creator":{"login":"Sannis","id":77367,"avatar_url":"https://avatars.githubusercontent.com/u/77367?v=3","gravatar_id":"","url":"https://api.github.com/users/Sannis","html_url":"https://github.com/Sannis","followers_url":"https://api.github.com/users/Sannis/followers","following_url":"https://api.github.com/users/Sannis/following{/other_user}","gists_url":"https://api.github.com/users/Sannis/gists{/gist_id}","starred_url":"https://api.github.com/users/Sannis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sannis/subscriptions","organizations_url":"https://api.github.com/users/Sannis/orgs","repos_url":"https://api.github.com/users/Sannis/repos","events_url":"https://api.github.com/users/Sannis/events{/privacy}","received_events_url":"https://api.github.com/users/Sannis/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":6,"state":"open","created_at":"2015-10-19T21:28:32Z","updated_at":"2015-10-24T13:26:03Z","due_on":"2015-11-30T21:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/isagalaev/highlight.js/pulls/963/commits","review_comments_url":"https://api.github.com/repos/isagalaev/highlight.js/pulls/963/comments","review_comment_url":"https://api.github.com/repos/isagalaev/highlight.js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/isagalaev/highlight.js/issues/963/comments","statuses_url":"https://api.github.com/repos/isagalaev/highlight.js/statuses/0531dd0fb6a1b53d3727b747c064a156344d0198","head":{"label":"frigus02:master","ref":"master","sha":"0531dd0fb6a1b53d3727b747c064a156344d0198","user":{"login":"frigus02","id":3579251,"avatar_url":"https://avatars.githubusercontent.com/u/3579251?v=3","gravatar_id":"","url":"https://api.github.com/users/frigus02","html_url":"https://github.com/frigus02","followers_url":"https://api.github.com/users/frigus02/followers","following_url":"https://api.github.com/users/frigus02/following{/other_user}","gists_url":"https://api.github.com/users/frigus02/gists{/gist_id}","starred_url":"https://api.github.com/users/frigus02/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frigus02/subscriptions","organizations_url":"https://api.github.com/users/frigus02/orgs","repos_url":"https://api.github.com/users/frigus02/repos","events_url":"https://api.github.com/users/frigus02/events{/privacy}","received_events_url":"https://api.github.com/users/frigus02/received_events","type":"User","site_admin":false},"repo":{"id":44804858,"name":"highlight.js","full_name":"frigus02/highlight.js","owner":{"login":"frigus02","id":3579251,"avatar_url":"https://avatars.githubusercontent.com/u/3579251?v=3","gravatar_id":"","url":"https://api.github.com/users/frigus02","html_url":"https://github.com/frigus02","followers_url":"https://api.github.com/users/frigus02/followers","following_url":"https://api.github.com/users/frigus02/following{/other_user}","gists_url":"https://api.github.com/users/frigus02/gists{/gist_id}","starred_url":"https://api.github.com/users/frigus02/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frigus02/subscriptions","organizations_url":"https://api.github.com/users/frigus02/orgs","repos_url":"https://api.github.com/users/frigus02/repos","events_url":"https://api.github.com/users/frigus02/events{/privacy}","received_events_url":"https://api.github.com/users/frigus02/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/frigus02/highlight.js","description":"Javascript syntax highlighter","fork":true,"url":"https://api.github.com/repos/frigus02/highlight.js","forks_url":"https://api.github.com/repos/frigus02/highlight.js/forks","keys_url":"https://api.github.com/repos/frigus02/highlight.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/frigus02/highlight.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/frigus02/highlight.js/teams","hooks_url":"https://api.github.com/repos/frigus02/highlight.js/hooks","issue_events_url":"https://api.github.com/repos/frigus02/highlight.js/issues/events{/number}","events_url":"https://api.github.com/repos/frigus02/highlight.js/events","assignees_url":"https://api.github.com/repos/frigus02/highlight.js/assignees{/user}","branches_url":"https://api.github.com/repos/frigus02/highlight.js/branches{/branch}","tags_url":"https://api.github.com/repos/frigus02/highlight.js/tags","blobs_url":"https://api.github.com/repos/frigus02/highlight.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/frigus02/highlight.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/frigus02/highlight.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/frigus02/highlight.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/frigus02/highlight.js/statuses/{sha}","languages_url":"https://api.github.com/repos/frigus02/highlight.js/languages","stargazers_url":"https://api.github.com/repos/frigus02/highlight.js/stargazers","contributors_url":"https://api.github.com/repos/frigus02/highlight.js/contributors","subscribers_url":"https://api.github.com/repos/frigus02/highlight.js/subscribers","subscription_url":"https://api.github.com/repos/frigus02/highlight.js/subscription","commits_url":"https://api.github.com/repos/frigus02/highlight.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/frigus02/highlight.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/frigus02/highlight.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/frigus02/highlight.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/frigus02/highlight.js/contents/{+path}","compare_url":"https://api.github.com/repos/frigus02/highlight.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/frigus02/highlight.js/merges","archive_url":"https://api.github.com/repos/frigus02/highlight.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/frigus02/highlight.js/downloads","issues_url":"https://api.github.com/repos/frigus02/highlight.js/issues{/number}","pulls_url":"https://api.github.com/repos/frigus02/highlight.js/pulls{/number}","milestones_url":"https://api.github.com/repos/frigus02/highlight.js/milestones{/number}","notifications_url":"https://api.github.com/repos/frigus02/highlight.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/frigus02/highlight.js/labels{/name}","releases_url":"https://api.github.com/repos/frigus02/highlight.js/releases{/id}","created_at":"2015-10-23T09:59:27Z","updated_at":"2015-10-23T09:59:29Z","pushed_at":"2015-10-24T09:27:26Z","git_url":"git://github.com/frigus02/highlight.js.git","ssh_url":"git@github.com:frigus02/highlight.js.git","clone_url":"https://github.com/frigus02/highlight.js.git","svn_url":"https://github.com/frigus02/highlight.js","homepage":"https://highlightjs.org/","size":13622,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"isagalaev:master","ref":"master","sha":"125a9fa2045804b9169c237fe5c789a885bfa7a2","user":{"login":"isagalaev","id":99931,"avatar_url":"https://avatars.githubusercontent.com/u/99931?v=3","gravatar_id":"","url":"https://api.github.com/users/isagalaev","html_url":"https://github.com/isagalaev","followers_url":"https://api.github.com/users/isagalaev/followers","following_url":"https://api.github.com/users/isagalaev/following{/other_user}","gists_url":"https://api.github.com/users/isagalaev/gists{/gist_id}","starred_url":"https://api.github.com/users/isagalaev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/isagalaev/subscriptions","organizations_url":"https://api.github.com/users/isagalaev/orgs","repos_url":"https://api.github.com/users/isagalaev/repos","events_url":"https://api.github.com/users/isagalaev/events{/privacy}","received_events_url":"https://api.github.com/users/isagalaev/received_events","type":"User","site_admin":false},"repo":{"id":1213225,"name":"highlight.js","full_name":"isagalaev/highlight.js","owner":{"login":"isagalaev","id":99931,"avatar_url":"https://avatars.githubusercontent.com/u/99931?v=3","gravatar_id":"","url":"https://api.github.com/users/isagalaev","html_url":"https://github.com/isagalaev","followers_url":"https://api.github.com/users/isagalaev/followers","following_url":"https://api.github.com/users/isagalaev/following{/other_user}","gists_url":"https://api.github.com/users/isagalaev/gists{/gist_id}","starred_url":"https://api.github.com/users/isagalaev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/isagalaev/subscriptions","organizations_url":"https://api.github.com/users/isagalaev/orgs","repos_url":"https://api.github.com/users/isagalaev/repos","events_url":"https://api.github.com/users/isagalaev/events{/privacy}","received_events_url":"https://api.github.com/users/isagalaev/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/isagalaev/highlight.js","description":"Javascript syntax highlighter","fork":false,"url":"https://api.github.com/repos/isagalaev/highlight.js","forks_url":"https://api.github.com/repos/isagalaev/highlight.js/forks","keys_url":"https://api.github.com/repos/isagalaev/highlight.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/isagalaev/highlight.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/isagalaev/highlight.js/teams","hooks_url":"https://api.github.com/repos/isagalaev/highlight.js/hooks","issue_events_url":"https://api.github.com/repos/isagalaev/highlight.js/issues/events{/number}","events_url":"https://api.github.com/repos/isagalaev/highlight.js/events","assignees_url":"https://api.github.com/repos/isagalaev/highlight.js/assignees{/user}","branches_url":"https://api.github.com/repos/isagalaev/highlight.js/branches{/branch}","tags_url":"https://api.github.com/repos/isagalaev/highlight.js/tags","blobs_url":"https://api.github.com/repos/isagalaev/highlight.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/isagalaev/highlight.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/isagalaev/highlight.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/isagalaev/highlight.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/isagalaev/highlight.js/statuses/{sha}","languages_url":"https://api.github.com/repos/isagalaev/highlight.js/languages","stargazers_url":"https://api.github.com/repos/isagalaev/highlight.js/stargazers","contributors_url":"https://api.github.com/repos/isagalaev/highlight.js/contributors","subscribers_url":"https://api.github.com/repos/isagalaev/highlight.js/subscribers","subscription_url":"https://api.github.com/repos/isagalaev/highlight.js/subscription","commits_url":"https://api.github.com/repos/isagalaev/highlight.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/isagalaev/highlight.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/isagalaev/highlight.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/isagalaev/highlight.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/isagalaev/highlight.js/contents/{+path}","compare_url":"https://api.github.com/repos/isagalaev/highlight.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/isagalaev/highlight.js/merges","archive_url":"https://api.github.com/repos/isagalaev/highlight.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/isagalaev/highlight.js/downloads","issues_url":"https://api.github.com/repos/isagalaev/highlight.js/issues{/number}","pulls_url":"https://api.github.com/repos/isagalaev/highlight.js/pulls{/number}","milestones_url":"https://api.github.com/repos/isagalaev/highlight.js/milestones{/number}","notifications_url":"https://api.github.com/repos/isagalaev/highlight.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/isagalaev/highlight.js/labels{/name}","releases_url":"https://api.github.com/repos/isagalaev/highlight.js/releases{/id}","created_at":"2011-01-01T23:47:21Z","updated_at":"2015-10-24T12:23:47Z","pushed_at":"2015-10-24T13:26:03Z","git_url":"git://github.com/isagalaev/highlight.js.git","ssh_url":"git@github.com:isagalaev/highlight.js.git","clone_url":"https://github.com/isagalaev/highlight.js.git","svn_url":"https://github.com/isagalaev/highlight.js","homepage":"https://highlightjs.org/","size":13622,"stargazers_count":6127,"watchers_count":6127,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1053,"mirror_url":null,"open_issues_count":18,"forks":1053,"open_issues":18,"watchers":6127,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/isagalaev/highlight.js/pulls/963"},"html":{"href":"https://github.com/isagalaev/highlight.js/pull/963"},"issue":{"href":"https://api.github.com/repos/isagalaev/highlight.js/issues/963"},"comments":{"href":"https://api.github.com/repos/isagalaev/highlight.js/issues/963/comments"},"review_comments":{"href":"https://api.github.com/repos/isagalaev/highlight.js/pulls/963/comments"},"review_comment":{"href":"https://api.github.com/repos/isagalaev/highlight.js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/isagalaev/highlight.js/pulls/963/commits"},"statuses":{"href":"https://api.github.com/repos/isagalaev/highlight.js/statuses/0531dd0fb6a1b53d3727b747c064a156344d0198"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"Sannis","id":77367,"avatar_url":"https://avatars.githubusercontent.com/u/77367?v=3","gravatar_id":"","url":"https://api.github.com/users/Sannis","html_url":"https://github.com/Sannis","followers_url":"https://api.github.com/users/Sannis/followers","following_url":"https://api.github.com/users/Sannis/following{/other_user}","gists_url":"https://api.github.com/users/Sannis/gists{/gist_id}","starred_url":"https://api.github.com/users/Sannis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sannis/subscriptions","organizations_url":"https://api.github.com/users/Sannis/orgs","repos_url":"https://api.github.com/users/Sannis/repos","events_url":"https://api.github.com/users/Sannis/events{/privacy}","received_events_url":"https://api.github.com/users/Sannis/received_events","type":"User","site_admin":false},"comments":5,"review_comments":0,"commits":2,"additions":105,"deletions":40,"changed_files":5}}