{"action":"created","comment":{"url":"https://api.github.com/repos/CartoDB/carto-vl/pulls/comments/186113867","pull_request_review_id":117644214,"id":186113867,"diff_hunk":"@@ -179,3 +179,14 @@ function cleanJsep() {\n     jsep.addLiteral('true');\n     jsep.addLiteral('false');\n }\n+\n+/**\n+ * Remove comments from string\n+ * - // one-line comments\n+ * - /* multi-line\n+ *     comments */\n+export function cleanComments(str) {\n+    return str\n+        .replace(/\\/\\/.*/g, '')\n+        .replace(/\\/\\*(\\*(?!\\/)|[^*])*\\*\\//g, '');\n+}","path":"src/core/viz/parser.js","position":23,"original_position":23,"commit_id":"2ea79fa5fa8da084e7eb5b6ed763918afd19ed23","original_commit_id":"2ea79fa5fa8da084e7eb5b6ed763918afd19ed23","user":{"login":"Jesus89","id":2227572,"avatar_url":"https://avatars3.githubusercontent.com/u/2227572?v=4","gravatar_id":"","url":"https://api.github.com/users/Jesus89","html_url":"https://github.com/Jesus89","followers_url":"https://api.github.com/users/Jesus89/followers","following_url":"https://api.github.com/users/Jesus89/following{/other_user}","gists_url":"https://api.github.com/users/Jesus89/gists{/gist_id}","starred_url":"https://api.github.com/users/Jesus89/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jesus89/subscriptions","organizations_url":"https://api.github.com/users/Jesus89/orgs","repos_url":"https://api.github.com/users/Jesus89/repos","events_url":"https://api.github.com/users/Jesus89/events{/privacy}","received_events_url":"https://api.github.com/users/Jesus89/received_events","type":"User","site_admin":false},"body":"I see. We need stronger regex :muscle:","created_at":"2018-05-04T15:12:21Z","updated_at":"2018-05-04T15:12:21Z","html_url":"https://github.com/CartoDB/carto-vl/pull/372#discussion_r186113867","pull_request_url":"https://api.github.com/repos/CartoDB/carto-vl/pulls/372","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/CartoDB/carto-vl/pulls/comments/186113867"},"html":{"href":"https://github.com/CartoDB/carto-vl/pull/372#discussion_r186113867"},"pull_request":{"href":"https://api.github.com/repos/CartoDB/carto-vl/pulls/372"}},"in_reply_to_id":186110370},"pull_request":{"url":"https://api.github.com/repos/CartoDB/carto-vl/pulls/372","id":185995701,"html_url":"https://github.com/CartoDB/carto-vl/pull/372","diff_url":"https://github.com/CartoDB/carto-vl/pull/372.diff","patch_url":"https://github.com/CartoDB/carto-vl/pull/372.patch","issue_url":"https://api.github.com/repos/CartoDB/carto-vl/issues/372","number":372,"state":"open","locked":false,"title":"Clean viz comments","user":{"login":"Jesus89","id":2227572,"avatar_url":"https://avatars3.githubusercontent.com/u/2227572?v=4","gravatar_id":"","url":"https://api.github.com/users/Jesus89","html_url":"https://github.com/Jesus89","followers_url":"https://api.github.com/users/Jesus89/followers","following_url":"https://api.github.com/users/Jesus89/following{/other_user}","gists_url":"https://api.github.com/users/Jesus89/gists{/gist_id}","starred_url":"https://api.github.com/users/Jesus89/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jesus89/subscriptions","organizations_url":"https://api.github.com/users/Jesus89/orgs","repos_url":"https://api.github.com/users/Jesus89/repos","events_url":"https://api.github.com/users/Jesus89/events{/privacy}","received_events_url":"https://api.github.com/users/Jesus89/received_events","type":"User","site_admin":false},"body":"Related to https://github.com/CartoDB/carto-vl/issues/370\r\n\r\n- Clean one-line comment in viz string\r\n- Clean multi-line-comments in viz string\r\n- Add unit tests","created_at":"2018-05-04T14:11:58Z","updated_at":"2018-05-04T15:12:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"29c2cd2251c4b33fa292fa0230dbe698318a5c12","assignee":null,"assignees":[],"requested_reviewers":[{"login":"rochoa","id":45346,"avatar_url":"https://avatars1.githubusercontent.com/u/45346?v=4","gravatar_id":"","url":"https://api.github.com/users/rochoa","html_url":"https://github.com/rochoa","followers_url":"https://api.github.com/users/rochoa/followers","following_url":"https://api.github.com/users/rochoa/following{/other_user}","gists_url":"https://api.github.com/users/rochoa/gists{/gist_id}","starred_url":"https://api.github.com/users/rochoa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rochoa/subscriptions","organizations_url":"https://api.github.com/users/rochoa/orgs","repos_url":"https://api.github.com/users/rochoa/repos","events_url":"https://api.github.com/users/rochoa/events{/privacy}","received_events_url":"https://api.github.com/users/rochoa/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/CartoDB/carto-vl/pulls/372/commits","review_comments_url":"https://api.github.com/repos/CartoDB/carto-vl/pulls/372/comments","review_comment_url":"https://api.github.com/repos/CartoDB/carto-vl/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CartoDB/carto-vl/issues/372/comments","statuses_url":"https://api.github.com/repos/CartoDB/carto-vl/statuses/2ea79fa5fa8da084e7eb5b6ed763918afd19ed23","head":{"label":"CartoDB:clean-viz-comments","ref":"clean-viz-comments","sha":"2ea79fa5fa8da084e7eb5b6ed763918afd19ed23","user":{"login":"CartoDB","id":1799254,"avatar_url":"https://avatars0.githubusercontent.com/u/1799254?v=4","gravatar_id":"","url":"https://api.github.com/users/CartoDB","html_url":"https://github.com/CartoDB","followers_url":"https://api.github.com/users/CartoDB/followers","following_url":"https://api.github.com/users/CartoDB/following{/other_user}","gists_url":"https://api.github.com/users/CartoDB/gists{/gist_id}","starred_url":"https://api.github.com/users/CartoDB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CartoDB/subscriptions","organizations_url":"https://api.github.com/users/CartoDB/orgs","repos_url":"https://api.github.com/users/CartoDB/repos","events_url":"https://api.github.com/users/CartoDB/events{/privacy}","received_events_url":"https://api.github.com/users/CartoDB/received_events","type":"Organization","site_admin":false},"repo":{"id":106824313,"name":"carto-vl","full_name":"CartoDB/carto-vl","owner":{"login":"CartoDB","id":1799254,"avatar_url":"https://avatars0.githubusercontent.com/u/1799254?v=4","gravatar_id":"","url":"https://api.github.com/users/CartoDB","html_url":"https://github.com/CartoDB","followers_url":"https://api.github.com/users/CartoDB/followers","following_url":"https://api.github.com/users/CartoDB/following{/other_user}","gists_url":"https://api.github.com/users/CartoDB/gists{/gist_id}","starred_url":"https://api.github.com/users/CartoDB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CartoDB/subscriptions","organizations_url":"https://api.github.com/users/CartoDB/orgs","repos_url":"https://api.github.com/users/CartoDB/repos","events_url":"https://api.github.com/users/CartoDB/events{/privacy}","received_events_url":"https://api.github.com/users/CartoDB/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CartoDB/carto-vl","description":"CARTO VL","fork":false,"url":"https://api.github.com/repos/CartoDB/carto-vl","forks_url":"https://api.github.com/repos/CartoDB/carto-vl/forks","keys_url":"https://api.github.com/repos/CartoDB/carto-vl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CartoDB/carto-vl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CartoDB/carto-vl/teams","hooks_url":"https://api.github.com/repos/CartoDB/carto-vl/hooks","issue_events_url":"https://api.github.com/repos/CartoDB/carto-vl/issues/events{/number}","events_url":"https://api.github.com/repos/CartoDB/carto-vl/events","assignees_url":"https://api.github.com/repos/CartoDB/carto-vl/assignees{/user}","branches_url":"https://api.github.com/repos/CartoDB/carto-vl/branches{/branch}","tags_url":"https://api.github.com/repos/CartoDB/carto-vl/tags","blobs_url":"https://api.github.com/repos/CartoDB/carto-vl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CartoDB/carto-vl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CartoDB/carto-vl/git/refs{/sha}","trees_url":"https://api.github.com/repos/CartoDB/carto-vl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CartoDB/carto-vl/statuses/{sha}","languages_url":"https://api.github.com/repos/CartoDB/carto-vl/languages","stargazers_url":"https://api.github.com/repos/CartoDB/carto-vl/stargazers","contributors_url":"https://api.github.com/repos/CartoDB/carto-vl/contributors","subscribers_url":"https://api.github.com/repos/CartoDB/carto-vl/subscribers","subscription_url":"https://api.github.com/repos/CartoDB/carto-vl/subscription","commits_url":"https://api.github.com/repos/CartoDB/carto-vl/commits{/sha}","git_commits_url":"https://api.github.com/repos/CartoDB/carto-vl/git/commits{/sha}","comments_url":"https://api.github.com/repos/CartoDB/carto-vl/comments{/number}","issue_comment_url":"https://api.github.com/repos/CartoDB/carto-vl/issues/comments{/number}","contents_url":"https://api.github.com/repos/CartoDB/carto-vl/contents/{+path}","compare_url":"https://api.github.com/repos/CartoDB/carto-vl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CartoDB/carto-vl/merges","archive_url":"https://api.github.com/repos/CartoDB/carto-vl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CartoDB/carto-vl/downloads","issues_url":"https://api.github.com/repos/CartoDB/carto-vl/issues{/number}","pulls_url":"https://api.github.com/repos/CartoDB/carto-vl/pulls{/number}","milestones_url":"https://api.github.com/repos/CartoDB/carto-vl/milestones{/number}","notifications_url":"https://api.github.com/repos/CartoDB/carto-vl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CartoDB/carto-vl/labels{/name}","releases_url":"https://api.github.com/repos/CartoDB/carto-vl/releases{/id}","deployments_url":"https://api.github.com/repos/CartoDB/carto-vl/deployments","created_at":"2017-10-13T12:56:39Z","updated_at":"2018-05-04T08:45:23Z","pushed_at":"2018-05-04T14:11:59Z","git_url":"git://github.com/CartoDB/carto-vl.git","ssh_url":"git@github.com:CartoDB/carto-vl.git","clone_url":"https://github.com/CartoDB/carto-vl.git","svn_url":"https://github.com/CartoDB/carto-vl","homepage":"","size":31093,"stargazers_count":18,"watchers_count":18,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":59,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause"},"forks":2,"open_issues":59,"watchers":18,"default_branch":"master"}},"base":{"label":"CartoDB:master","ref":"master","sha":"2f0f06dfbe2444f85939b63f606505b79145e06d","user":{"login":"CartoDB","id":1799254,"avatar_url":"https://avatars0.githubusercontent.com/u/1799254?v=4","gravatar_id":"","url":"https://api.github.com/users/CartoDB","html_url":"https://github.com/CartoDB","followers_url":"https://api.github.com/users/CartoDB/followers","following_url":"https://api.github.com/users/CartoDB/following{/other_user}","gists_url":"https://api.github.com/users/CartoDB/gists{/gist_id}","starred_url":"https://api.github.com/users/CartoDB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CartoDB/subscriptions","organizations_url":"https://api.github.com/users/CartoDB/orgs","repos_url":"https://api.github.com/users/CartoDB/repos","events_url":"https://api.github.com/users/CartoDB/events{/privacy}","received_events_url":"https://api.github.com/users/CartoDB/received_events","type":"Organization","site_admin":false},"repo":{"id":106824313,"name":"carto-vl","full_name":"CartoDB/carto-vl","owner":{"login":"CartoDB","id":1799254,"avatar_url":"https://avatars0.githubusercontent.com/u/1799254?v=4","gravatar_id":"","url":"https://api.github.com/users/CartoDB","html_url":"https://github.com/CartoDB","followers_url":"https://api.github.com/users/CartoDB/followers","following_url":"https://api.github.com/users/CartoDB/following{/other_user}","gists_url":"https://api.github.com/users/CartoDB/gists{/gist_id}","starred_url":"https://api.github.com/users/CartoDB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CartoDB/subscriptions","organizations_url":"https://api.github.com/users/CartoDB/orgs","repos_url":"https://api.github.com/users/CartoDB/repos","events_url":"https://api.github.com/users/CartoDB/events{/privacy}","received_events_url":"https://api.github.com/users/CartoDB/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CartoDB/carto-vl","description":"CARTO VL","fork":false,"url":"https://api.github.com/repos/CartoDB/carto-vl","forks_url":"https://api.github.com/repos/CartoDB/carto-vl/forks","keys_url":"https://api.github.com/repos/CartoDB/carto-vl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CartoDB/carto-vl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CartoDB/carto-vl/teams","hooks_url":"https://api.github.com/repos/CartoDB/carto-vl/hooks","issue_events_url":"https://api.github.com/repos/CartoDB/carto-vl/issues/events{/number}","events_url":"https://api.github.com/repos/CartoDB/carto-vl/events","assignees_url":"https://api.github.com/repos/CartoDB/carto-vl/assignees{/user}","branches_url":"https://api.github.com/repos/CartoDB/carto-vl/branches{/branch}","tags_url":"https://api.github.com/repos/CartoDB/carto-vl/tags","blobs_url":"https://api.github.com/repos/CartoDB/carto-vl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CartoDB/carto-vl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CartoDB/carto-vl/git/refs{/sha}","trees_url":"https://api.github.com/repos/CartoDB/carto-vl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CartoDB/carto-vl/statuses/{sha}","languages_url":"https://api.github.com/repos/CartoDB/carto-vl/languages","stargazers_url":"https://api.github.com/repos/CartoDB/carto-vl/stargazers","contributors_url":"https://api.github.com/repos/CartoDB/carto-vl/contributors","subscribers_url":"https://api.github.com/repos/CartoDB/carto-vl/subscribers","subscription_url":"https://api.github.com/repos/CartoDB/carto-vl/subscription","commits_url":"https://api.github.com/repos/CartoDB/carto-vl/commits{/sha}","git_commits_url":"https://api.github.com/repos/CartoDB/carto-vl/git/commits{/sha}","comments_url":"https://api.github.com/repos/CartoDB/carto-vl/comments{/number}","issue_comment_url":"https://api.github.com/repos/CartoDB/carto-vl/issues/comments{/number}","contents_url":"https://api.github.com/repos/CartoDB/carto-vl/contents/{+path}","compare_url":"https://api.github.com/repos/CartoDB/carto-vl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CartoDB/carto-vl/merges","archive_url":"https://api.github.com/repos/CartoDB/carto-vl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CartoDB/carto-vl/downloads","issues_url":"https://api.github.com/repos/CartoDB/carto-vl/issues{/number}","pulls_url":"https://api.github.com/repos/CartoDB/carto-vl/pulls{/number}","milestones_url":"https://api.github.com/repos/CartoDB/carto-vl/milestones{/number}","notifications_url":"https://api.github.com/repos/CartoDB/carto-vl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CartoDB/carto-vl/labels{/name}","releases_url":"https://api.github.com/repos/CartoDB/carto-vl/releases{/id}","deployments_url":"https://api.github.com/repos/CartoDB/carto-vl/deployments","created_at":"2017-10-13T12:56:39Z","updated_at":"2018-05-04T08:45:23Z","pushed_at":"2018-05-04T14:11:59Z","git_url":"git://github.com/CartoDB/carto-vl.git","ssh_url":"git@github.com:CartoDB/carto-vl.git","clone_url":"https://github.com/CartoDB/carto-vl.git","svn_url":"https://github.com/CartoDB/carto-vl","homepage":"","size":31093,"stargazers_count":18,"watchers_count":18,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":59,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause"},"forks":2,"open_issues":59,"watchers":18,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CartoDB/carto-vl/pulls/372"},"html":{"href":"https://github.com/CartoDB/carto-vl/pull/372"},"issue":{"href":"https://api.github.com/repos/CartoDB/carto-vl/issues/372"},"comments":{"href":"https://api.github.com/repos/CartoDB/carto-vl/issues/372/comments"},"review_comments":{"href":"https://api.github.com/repos/CartoDB/carto-vl/pulls/372/comments"},"review_comment":{"href":"https://api.github.com/repos/CartoDB/carto-vl/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CartoDB/carto-vl/pulls/372/commits"},"statuses":{"href":"https://api.github.com/repos/CartoDB/carto-vl/statuses/2ea79fa5fa8da084e7eb5b6ed763918afd19ed23"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"Jesus89"}}