{"action":"created","comment":{"url":"https://api.github.com/repos/mishoo/UglifyJS2/pulls/comments/67263550","id":67263550,"diff_hunk":"@@ -1185,6 +1200,20 @@ function OutputStream(options) {\n         output.print(self.getValue());\n     });\n     DEFPRINT(AST_String, function(self, output){\n+        // Check if there is a need to break directive by inserting an additional semicolon\n+        if (in_directive) {\n+            var str = output.encode_string(self.getValue(), self.quote);\n+            // Only output semicolons if string might be a valid directive\n+            if (str.indexOf(\"\\\\\") === -1) {\n+                var code = output.get();\n+                // Extra semicolon might be needed to break directive prologue\n+                if (!NEED_SINGLE_SEMICOLON.test(code)) {\n+                    output.force_semicolon();\n+                }\n+                output.force_semicolon();","path":"lib/output.js","position":99,"original_position":99,"commit_id":"3882090dbf572c819ef41dedc2f9d8152ef85957","original_commit_id":"3882090dbf572c819ef41dedc2f9d8152ef85957","user":{"login":"avdg","id":212248,"avatar_url":"https://avatars.githubusercontent.com/u/212248?v=3","gravatar_id":"","url":"https://api.github.com/users/avdg","html_url":"https://github.com/avdg","followers_url":"https://api.github.com/users/avdg/followers","following_url":"https://api.github.com/users/avdg/following{/other_user}","gists_url":"https://api.github.com/users/avdg/gists{/gist_id}","starred_url":"https://api.github.com/users/avdg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avdg/subscriptions","organizations_url":"https://api.github.com/users/avdg/orgs","repos_url":"https://api.github.com/users/avdg/repos","events_url":"https://api.github.com/users/avdg/events{/privacy}","received_events_url":"https://api.github.com/users/avdg/received_events","type":"User","site_admin":false},"body":"There seems to be a test already failing if there wasn't a double semicolon inserted, but I'll add another test.","created_at":"2016-06-15T23:20:40Z","updated_at":"2016-06-15T23:20:40Z","html_url":"https://github.com/mishoo/UglifyJS2/pull/1135#discussion_r67263550","pull_request_url":"https://api.github.com/repos/mishoo/UglifyJS2/pulls/1135","_links":{"self":{"href":"https://api.github.com/repos/mishoo/UglifyJS2/pulls/comments/67263550"},"html":{"href":"https://github.com/mishoo/UglifyJS2/pull/1135#discussion_r67263550"},"pull_request":{"href":"https://api.github.com/repos/mishoo/UglifyJS2/pulls/1135"}}},"pull_request":{"url":"https://api.github.com/repos/mishoo/UglifyJS2/pulls/1135","id":73627376,"html_url":"https://github.com/mishoo/UglifyJS2/pull/1135","diff_url":"https://github.com/mishoo/UglifyJS2/pull/1135.diff","patch_url":"https://github.com/mishoo/UglifyJS2/pull/1135.patch","issue_url":"https://api.github.com/repos/mishoo/UglifyJS2/issues/1135","number":1135,"state":"open","locked":false,"title":"Don't mix strings with directives in output","user":{"login":"avdg","id":212248,"avatar_url":"https://avatars.githubusercontent.com/u/212248?v=3","gravatar_id":"","url":"https://api.github.com/users/avdg","html_url":"https://github.com/avdg","followers_url":"https://api.github.com/users/avdg/followers","following_url":"https://api.github.com/users/avdg/following{/other_user}","gists_url":"https://api.github.com/users/avdg/gists{/gist_id}","starred_url":"https://api.github.com/users/avdg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avdg/subscriptions","organizations_url":"https://api.github.com/users/avdg/orgs","repos_url":"https://api.github.com/users/avdg/repos","events_url":"https://api.github.com/users/avdg/events{/privacy}","received_events_url":"https://api.github.com/users/avdg/received_events","type":"User","site_admin":false},"body":"Directives should be printed untouched.","created_at":"2016-06-13T19:12:40Z","updated_at":"2016-06-15T23:20:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6616d3e8df82acf3b21e6f28d78f31472dfbc89a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mishoo/UglifyJS2/pulls/1135/commits","review_comments_url":"https://api.github.com/repos/mishoo/UglifyJS2/pulls/1135/comments","review_comment_url":"https://api.github.com/repos/mishoo/UglifyJS2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mishoo/UglifyJS2/issues/1135/comments","statuses_url":"https://api.github.com/repos/mishoo/UglifyJS2/statuses/3882090dbf572c819ef41dedc2f9d8152ef85957","head":{"label":"avdg:literal-directives","ref":"literal-directives","sha":"3882090dbf572c819ef41dedc2f9d8152ef85957","user":{"login":"avdg","id":212248,"avatar_url":"https://avatars.githubusercontent.com/u/212248?v=3","gravatar_id":"","url":"https://api.github.com/users/avdg","html_url":"https://github.com/avdg","followers_url":"https://api.github.com/users/avdg/followers","following_url":"https://api.github.com/users/avdg/following{/other_user}","gists_url":"https://api.github.com/users/avdg/gists{/gist_id}","starred_url":"https://api.github.com/users/avdg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avdg/subscriptions","organizations_url":"https://api.github.com/users/avdg/orgs","repos_url":"https://api.github.com/users/avdg/repos","events_url":"https://api.github.com/users/avdg/events{/privacy}","received_events_url":"https://api.github.com/users/avdg/received_events","type":"User","site_admin":false},"repo":{"id":14694091,"name":"UglifyJS2","full_name":"avdg/UglifyJS2","owner":{"login":"avdg","id":212248,"avatar_url":"https://avatars.githubusercontent.com/u/212248?v=3","gravatar_id":"","url":"https://api.github.com/users/avdg","html_url":"https://github.com/avdg","followers_url":"https://api.github.com/users/avdg/followers","following_url":"https://api.github.com/users/avdg/following{/other_user}","gists_url":"https://api.github.com/users/avdg/gists{/gist_id}","starred_url":"https://api.github.com/users/avdg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avdg/subscriptions","organizations_url":"https://api.github.com/users/avdg/orgs","repos_url":"https://api.github.com/users/avdg/repos","events_url":"https://api.github.com/users/avdg/events{/privacy}","received_events_url":"https://api.github.com/users/avdg/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/avdg/UglifyJS2","description":" JavaScript parser / mangler / compressor / beautifier toolkit","fork":true,"url":"https://api.github.com/repos/avdg/UglifyJS2","forks_url":"https://api.github.com/repos/avdg/UglifyJS2/forks","keys_url":"https://api.github.com/repos/avdg/UglifyJS2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/avdg/UglifyJS2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/avdg/UglifyJS2/teams","hooks_url":"https://api.github.com/repos/avdg/UglifyJS2/hooks","issue_events_url":"https://api.github.com/repos/avdg/UglifyJS2/issues/events{/number}","events_url":"https://api.github.com/repos/avdg/UglifyJS2/events","assignees_url":"https://api.github.com/repos/avdg/UglifyJS2/assignees{/user}","branches_url":"https://api.github.com/repos/avdg/UglifyJS2/branches{/branch}","tags_url":"https://api.github.com/repos/avdg/UglifyJS2/tags","blobs_url":"https://api.github.com/repos/avdg/UglifyJS2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/avdg/UglifyJS2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/avdg/UglifyJS2/git/refs{/sha}","trees_url":"https://api.github.com/repos/avdg/UglifyJS2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/avdg/UglifyJS2/statuses/{sha}","languages_url":"https://api.github.com/repos/avdg/UglifyJS2/languages","stargazers_url":"https://api.github.com/repos/avdg/UglifyJS2/stargazers","contributors_url":"https://api.github.com/repos/avdg/UglifyJS2/contributors","subscribers_url":"https://api.github.com/repos/avdg/UglifyJS2/subscribers","subscription_url":"https://api.github.com/repos/avdg/UglifyJS2/subscription","commits_url":"https://api.github.com/repos/avdg/UglifyJS2/commits{/sha}","git_commits_url":"https://api.github.com/repos/avdg/UglifyJS2/git/commits{/sha}","comments_url":"https://api.github.com/repos/avdg/UglifyJS2/comments{/number}","issue_comment_url":"https://api.github.com/repos/avdg/UglifyJS2/issues/comments{/number}","contents_url":"https://api.github.com/repos/avdg/UglifyJS2/contents/{+path}","compare_url":"https://api.github.com/repos/avdg/UglifyJS2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/avdg/UglifyJS2/merges","archive_url":"https://api.github.com/repos/avdg/UglifyJS2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/avdg/UglifyJS2/downloads","issues_url":"https://api.github.com/repos/avdg/UglifyJS2/issues{/number}","pulls_url":"https://api.github.com/repos/avdg/UglifyJS2/pulls{/number}","milestones_url":"https://api.github.com/repos/avdg/UglifyJS2/milestones{/number}","notifications_url":"https://api.github.com/repos/avdg/UglifyJS2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/avdg/UglifyJS2/labels{/name}","releases_url":"https://api.github.com/repos/avdg/UglifyJS2/releases{/id}","deployments_url":"https://api.github.com/repos/avdg/UglifyJS2/deployments","created_at":"2013-11-25T18:19:03Z","updated_at":"2015-02-11T22:58:46Z","pushed_at":"2016-06-15T23:01:00Z","git_url":"git://github.com/avdg/UglifyJS2.git","ssh_url":"git@github.com:avdg/UglifyJS2.git","clone_url":"https://github.com/avdg/UglifyJS2.git","svn_url":"https://github.com/avdg/UglifyJS2","homepage":"http://lisperator.net/uglifyjs/","size":1847,"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":"mishoo:master","ref":"master","sha":"5c4cfaa0a75317582c979f9b50c1e562fbcfa40d","user":{"login":"mishoo","id":334725,"avatar_url":"https://avatars.githubusercontent.com/u/334725?v=3","gravatar_id":"","url":"https://api.github.com/users/mishoo","html_url":"https://github.com/mishoo","followers_url":"https://api.github.com/users/mishoo/followers","following_url":"https://api.github.com/users/mishoo/following{/other_user}","gists_url":"https://api.github.com/users/mishoo/gists{/gist_id}","starred_url":"https://api.github.com/users/mishoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mishoo/subscriptions","organizations_url":"https://api.github.com/users/mishoo/orgs","repos_url":"https://api.github.com/users/mishoo/repos","events_url":"https://api.github.com/users/mishoo/events{/privacy}","received_events_url":"https://api.github.com/users/mishoo/received_events","type":"User","site_admin":false},"repo":{"id":5569059,"name":"UglifyJS2","full_name":"mishoo/UglifyJS2","owner":{"login":"mishoo","id":334725,"avatar_url":"https://avatars.githubusercontent.com/u/334725?v=3","gravatar_id":"","url":"https://api.github.com/users/mishoo","html_url":"https://github.com/mishoo","followers_url":"https://api.github.com/users/mishoo/followers","following_url":"https://api.github.com/users/mishoo/following{/other_user}","gists_url":"https://api.github.com/users/mishoo/gists{/gist_id}","starred_url":"https://api.github.com/users/mishoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mishoo/subscriptions","organizations_url":"https://api.github.com/users/mishoo/orgs","repos_url":"https://api.github.com/users/mishoo/repos","events_url":"https://api.github.com/users/mishoo/events{/privacy}","received_events_url":"https://api.github.com/users/mishoo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mishoo/UglifyJS2","description":" JavaScript parser / mangler / compressor / beautifier toolkit","fork":false,"url":"https://api.github.com/repos/mishoo/UglifyJS2","forks_url":"https://api.github.com/repos/mishoo/UglifyJS2/forks","keys_url":"https://api.github.com/repos/mishoo/UglifyJS2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mishoo/UglifyJS2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mishoo/UglifyJS2/teams","hooks_url":"https://api.github.com/repos/mishoo/UglifyJS2/hooks","issue_events_url":"https://api.github.com/repos/mishoo/UglifyJS2/issues/events{/number}","events_url":"https://api.github.com/repos/mishoo/UglifyJS2/events","assignees_url":"https://api.github.com/repos/mishoo/UglifyJS2/assignees{/user}","branches_url":"https://api.github.com/repos/mishoo/UglifyJS2/branches{/branch}","tags_url":"https://api.github.com/repos/mishoo/UglifyJS2/tags","blobs_url":"https://api.github.com/repos/mishoo/UglifyJS2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mishoo/UglifyJS2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mishoo/UglifyJS2/git/refs{/sha}","trees_url":"https://api.github.com/repos/mishoo/UglifyJS2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mishoo/UglifyJS2/statuses/{sha}","languages_url":"https://api.github.com/repos/mishoo/UglifyJS2/languages","stargazers_url":"https://api.github.com/repos/mishoo/UglifyJS2/stargazers","contributors_url":"https://api.github.com/repos/mishoo/UglifyJS2/contributors","subscribers_url":"https://api.github.com/repos/mishoo/UglifyJS2/subscribers","subscription_url":"https://api.github.com/repos/mishoo/UglifyJS2/subscription","commits_url":"https://api.github.com/repos/mishoo/UglifyJS2/commits{/sha}","git_commits_url":"https://api.github.com/repos/mishoo/UglifyJS2/git/commits{/sha}","comments_url":"https://api.github.com/repos/mishoo/UglifyJS2/comments{/number}","issue_comment_url":"https://api.github.com/repos/mishoo/UglifyJS2/issues/comments{/number}","contents_url":"https://api.github.com/repos/mishoo/UglifyJS2/contents/{+path}","compare_url":"https://api.github.com/repos/mishoo/UglifyJS2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mishoo/UglifyJS2/merges","archive_url":"https://api.github.com/repos/mishoo/UglifyJS2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mishoo/UglifyJS2/downloads","issues_url":"https://api.github.com/repos/mishoo/UglifyJS2/issues{/number}","pulls_url":"https://api.github.com/repos/mishoo/UglifyJS2/pulls{/number}","milestones_url":"https://api.github.com/repos/mishoo/UglifyJS2/milestones{/number}","notifications_url":"https://api.github.com/repos/mishoo/UglifyJS2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mishoo/UglifyJS2/labels{/name}","releases_url":"https://api.github.com/repos/mishoo/UglifyJS2/releases{/id}","deployments_url":"https://api.github.com/repos/mishoo/UglifyJS2/deployments","created_at":"2012-08-27T09:31:03Z","updated_at":"2016-06-15T20:53:53Z","pushed_at":"2016-06-15T23:01:01Z","git_url":"git://github.com/mishoo/UglifyJS2.git","ssh_url":"git@github.com:mishoo/UglifyJS2.git","clone_url":"https://github.com/mishoo/UglifyJS2.git","svn_url":"https://github.com/mishoo/UglifyJS2","homepage":"http://lisperator.net/uglifyjs/","size":3403,"stargazers_count":4928,"watchers_count":4928,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":545,"mirror_url":null,"open_issues_count":244,"forks":545,"open_issues":244,"watchers":4928,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mishoo/UglifyJS2/pulls/1135"},"html":{"href":"https://github.com/mishoo/UglifyJS2/pull/1135"},"issue":{"href":"https://api.github.com/repos/mishoo/UglifyJS2/issues/1135"},"comments":{"href":"https://api.github.com/repos/mishoo/UglifyJS2/issues/1135/comments"},"review_comments":{"href":"https://api.github.com/repos/mishoo/UglifyJS2/pulls/1135/comments"},"review_comment":{"href":"https://api.github.com/repos/mishoo/UglifyJS2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mishoo/UglifyJS2/pulls/1135/commits"},"statuses":{"href":"https://api.github.com/repos/mishoo/UglifyJS2/statuses/3882090dbf572c819ef41dedc2f9d8152ef85957"}}}}
{"actor":{"display_login":"avdg"}}