{"action":"closed","number":1286,"pull_request":{"url":"https://api.github.com/repos/Automattic/amp-wp/pulls/1286","id":203956160,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAzOTU2MTYw","html_url":"https://github.com/Automattic/amp-wp/pull/1286","diff_url":"https://github.com/Automattic/amp-wp/pull/1286.diff","patch_url":"https://github.com/Automattic/amp-wp/pull/1286.patch","issue_url":"https://api.github.com/repos/Automattic/amp-wp/issues/1286","number":1286,"state":"closed","locked":false,"title":"Fix parsing CSS selectors which contain commas","user":{"login":"westonruter","id":134745,"node_id":"MDQ6VXNlcjEzNDc0NQ==","avatar_url":"https://avatars2.githubusercontent.com/u/134745?v=4","gravatar_id":"","url":"https://api.github.com/users/westonruter","html_url":"https://github.com/westonruter","followers_url":"https://api.github.com/users/westonruter/followers","following_url":"https://api.github.com/users/westonruter/following{/other_user}","gists_url":"https://api.github.com/users/westonruter/gists{/gist_id}","starred_url":"https://api.github.com/users/westonruter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/westonruter/subscriptions","organizations_url":"https://api.github.com/users/westonruter/orgs","repos_url":"https://api.github.com/users/westonruter/repos","events_url":"https://api.github.com/users/westonruter/events{/privacy}","received_events_url":"https://api.github.com/users/westonruter/received_events","type":"User","site_admin":false},"body":"I found an issue where a CSS selectors would fail to parse correctly when they contain commas. For example:\r\n\r\n```css\r\n.widget:not(.widget_text, .jetpack_widget_social_icons) ul {\r\n    list-style: none;\r\n    margin: 0;\r\n    padding: 0;\r\n}\r\n```\r\n\r\nThere should only be one selector here: `.widget:not(.widget_text, .jetpack_widget_social_icons) ul`. Instead, the parser incorrectly extracts two:\r\n\r\n* `.widget:not(.widget_text`\r\n* `.jetpack_widget_social_icons) ul`\r\n\r\nThe fix is to add placeholders for expressions contained in parentheses or brackets prior to splitting, and then replace the placeholders with their original values on the split selectors.\r\n\r\nThis PR updates the PHP-CSS-Parser to the state of the library with this upstream PR merged: https://github.com/sabberworm/PHP-CSS-Parser/pull/138\r\n\r\nThis PR also fixes a PHPCS complaint regarding `preg_quote()` not having an explicit `$delimiter` set.","created_at":"2018-07-25T20:37:38Z","updated_at":"2018-07-26T01:16:50Z","closed_at":"2018-07-26T01:16:49Z","merged_at":"2018-07-26T01:16:49Z","merge_commit_sha":"80ed7f08fe2af13835d67998b89de65c4cff4ae9","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":{"url":"https://api.github.com/repos/Automattic/amp-wp/milestones/7","html_url":"https://github.com/Automattic/amp-wp/milestone/7","labels_url":"https://api.github.com/repos/Automattic/amp-wp/milestones/7/labels","id":3171161,"node_id":"MDk6TWlsZXN0b25lMzE3MTE2MQ==","number":7,"title":"v1.0","description":"","creator":{"login":"ThierryA","id":3581402,"node_id":"MDQ6VXNlcjM1ODE0MDI=","avatar_url":"https://avatars3.githubusercontent.com/u/3581402?v=4","gravatar_id":"","url":"https://api.github.com/users/ThierryA","html_url":"https://github.com/ThierryA","followers_url":"https://api.github.com/users/ThierryA/followers","following_url":"https://api.github.com/users/ThierryA/following{/other_user}","gists_url":"https://api.github.com/users/ThierryA/gists{/gist_id}","starred_url":"https://api.github.com/users/ThierryA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ThierryA/subscriptions","organizations_url":"https://api.github.com/users/ThierryA/orgs","repos_url":"https://api.github.com/users/ThierryA/repos","events_url":"https://api.github.com/users/ThierryA/events{/privacy}","received_events_url":"https://api.github.com/users/ThierryA/received_events","type":"User","site_admin":false},"open_issues":18,"closed_issues":118,"state":"open","created_at":"2018-03-08T09:34:26Z","updated_at":"2018-07-26T01:16:50Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/Automattic/amp-wp/pulls/1286/commits","review_comments_url":"https://api.github.com/repos/Automattic/amp-wp/pulls/1286/comments","review_comment_url":"https://api.github.com/repos/Automattic/amp-wp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Automattic/amp-wp/issues/1286/comments","statuses_url":"https://api.github.com/repos/Automattic/amp-wp/statuses/c0cf5929627cd9313e1b10f8c500293d9f4956e1","head":{"label":"Automattic:fix/css-selectors-with-commas","ref":"fix/css-selectors-with-commas","sha":"c0cf5929627cd9313e1b10f8c500293d9f4956e1","user":{"login":"Automattic","id":887802,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg4NzgwMg==","avatar_url":"https://avatars1.githubusercontent.com/u/887802?v=4","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"repo":{"id":42912130,"node_id":"MDEwOlJlcG9zaXRvcnk0MjkxMjEzMA==","name":"amp-wp","full_name":"Automattic/amp-wp","owner":{"login":"Automattic","id":887802,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg4NzgwMg==","avatar_url":"https://avatars1.githubusercontent.com/u/887802?v=4","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Automattic/amp-wp","description":"WordPress plugin for adding AMP support","fork":false,"url":"https://api.github.com/repos/Automattic/amp-wp","forks_url":"https://api.github.com/repos/Automattic/amp-wp/forks","keys_url":"https://api.github.com/repos/Automattic/amp-wp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Automattic/amp-wp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Automattic/amp-wp/teams","hooks_url":"https://api.github.com/repos/Automattic/amp-wp/hooks","issue_events_url":"https://api.github.com/repos/Automattic/amp-wp/issues/events{/number}","events_url":"https://api.github.com/repos/Automattic/amp-wp/events","assignees_url":"https://api.github.com/repos/Automattic/amp-wp/assignees{/user}","branches_url":"https://api.github.com/repos/Automattic/amp-wp/branches{/branch}","tags_url":"https://api.github.com/repos/Automattic/amp-wp/tags","blobs_url":"https://api.github.com/repos/Automattic/amp-wp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Automattic/amp-wp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Automattic/amp-wp/git/refs{/sha}","trees_url":"https://api.github.com/repos/Automattic/amp-wp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Automattic/amp-wp/statuses/{sha}","languages_url":"https://api.github.com/repos/Automattic/amp-wp/languages","stargazers_url":"https://api.github.com/repos/Automattic/amp-wp/stargazers","contributors_url":"https://api.github.com/repos/Automattic/amp-wp/contributors","subscribers_url":"https://api.github.com/repos/Automattic/amp-wp/subscribers","subscription_url":"https://api.github.com/repos/Automattic/amp-wp/subscription","commits_url":"https://api.github.com/repos/Automattic/amp-wp/commits{/sha}","git_commits_url":"https://api.github.com/repos/Automattic/amp-wp/git/commits{/sha}","comments_url":"https://api.github.com/repos/Automattic/amp-wp/comments{/number}","issue_comment_url":"https://api.github.com/repos/Automattic/amp-wp/issues/comments{/number}","contents_url":"https://api.github.com/repos/Automattic/amp-wp/contents/{+path}","compare_url":"https://api.github.com/repos/Automattic/amp-wp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Automattic/amp-wp/merges","archive_url":"https://api.github.com/repos/Automattic/amp-wp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Automattic/amp-wp/downloads","issues_url":"https://api.github.com/repos/Automattic/amp-wp/issues{/number}","pulls_url":"https://api.github.com/repos/Automattic/amp-wp/pulls{/number}","milestones_url":"https://api.github.com/repos/Automattic/amp-wp/milestones{/number}","notifications_url":"https://api.github.com/repos/Automattic/amp-wp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Automattic/amp-wp/labels{/name}","releases_url":"https://api.github.com/repos/Automattic/amp-wp/releases{/id}","deployments_url":"https://api.github.com/repos/Automattic/amp-wp/deployments","created_at":"2015-09-22T04:52:15Z","updated_at":"2018-07-25T13:55:55Z","pushed_at":"2018-07-26T01:16:49Z","git_url":"git://github.com/Automattic/amp-wp.git","ssh_url":"git@github.com:Automattic/amp-wp.git","clone_url":"https://github.com/Automattic/amp-wp.git","svn_url":"https://github.com/Automattic/amp-wp","homepage":"https://wordpress.org/plugins/amp/","size":11607,"stargazers_count":1187,"watchers_count":1187,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":265,"mirror_url":null,"archived":false,"open_issues_count":88,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":265,"open_issues":88,"watchers":1187,"default_branch":"develop"}},"base":{"label":"Automattic:develop","ref":"develop","sha":"8c764c3599360768a86a5a437def4f24ad6998b1","user":{"login":"Automattic","id":887802,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg4NzgwMg==","avatar_url":"https://avatars1.githubusercontent.com/u/887802?v=4","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"repo":{"id":42912130,"node_id":"MDEwOlJlcG9zaXRvcnk0MjkxMjEzMA==","name":"amp-wp","full_name":"Automattic/amp-wp","owner":{"login":"Automattic","id":887802,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg4NzgwMg==","avatar_url":"https://avatars1.githubusercontent.com/u/887802?v=4","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Automattic/amp-wp","description":"WordPress plugin for adding AMP support","fork":false,"url":"https://api.github.com/repos/Automattic/amp-wp","forks_url":"https://api.github.com/repos/Automattic/amp-wp/forks","keys_url":"https://api.github.com/repos/Automattic/amp-wp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Automattic/amp-wp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Automattic/amp-wp/teams","hooks_url":"https://api.github.com/repos/Automattic/amp-wp/hooks","issue_events_url":"https://api.github.com/repos/Automattic/amp-wp/issues/events{/number}","events_url":"https://api.github.com/repos/Automattic/amp-wp/events","assignees_url":"https://api.github.com/repos/Automattic/amp-wp/assignees{/user}","branches_url":"https://api.github.com/repos/Automattic/amp-wp/branches{/branch}","tags_url":"https://api.github.com/repos/Automattic/amp-wp/tags","blobs_url":"https://api.github.com/repos/Automattic/amp-wp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Automattic/amp-wp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Automattic/amp-wp/git/refs{/sha}","trees_url":"https://api.github.com/repos/Automattic/amp-wp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Automattic/amp-wp/statuses/{sha}","languages_url":"https://api.github.com/repos/Automattic/amp-wp/languages","stargazers_url":"https://api.github.com/repos/Automattic/amp-wp/stargazers","contributors_url":"https://api.github.com/repos/Automattic/amp-wp/contributors","subscribers_url":"https://api.github.com/repos/Automattic/amp-wp/subscribers","subscription_url":"https://api.github.com/repos/Automattic/amp-wp/subscription","commits_url":"https://api.github.com/repos/Automattic/amp-wp/commits{/sha}","git_commits_url":"https://api.github.com/repos/Automattic/amp-wp/git/commits{/sha}","comments_url":"https://api.github.com/repos/Automattic/amp-wp/comments{/number}","issue_comment_url":"https://api.github.com/repos/Automattic/amp-wp/issues/comments{/number}","contents_url":"https://api.github.com/repos/Automattic/amp-wp/contents/{+path}","compare_url":"https://api.github.com/repos/Automattic/amp-wp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Automattic/amp-wp/merges","archive_url":"https://api.github.com/repos/Automattic/amp-wp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Automattic/amp-wp/downloads","issues_url":"https://api.github.com/repos/Automattic/amp-wp/issues{/number}","pulls_url":"https://api.github.com/repos/Automattic/amp-wp/pulls{/number}","milestones_url":"https://api.github.com/repos/Automattic/amp-wp/milestones{/number}","notifications_url":"https://api.github.com/repos/Automattic/amp-wp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Automattic/amp-wp/labels{/name}","releases_url":"https://api.github.com/repos/Automattic/amp-wp/releases{/id}","deployments_url":"https://api.github.com/repos/Automattic/amp-wp/deployments","created_at":"2015-09-22T04:52:15Z","updated_at":"2018-07-25T13:55:55Z","pushed_at":"2018-07-26T01:16:49Z","git_url":"git://github.com/Automattic/amp-wp.git","ssh_url":"git@github.com:Automattic/amp-wp.git","clone_url":"https://github.com/Automattic/amp-wp.git","svn_url":"https://github.com/Automattic/amp-wp","homepage":"https://wordpress.org/plugins/amp/","size":11607,"stargazers_count":1187,"watchers_count":1187,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":265,"mirror_url":null,"archived":false,"open_issues_count":88,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":265,"open_issues":88,"watchers":1187,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/Automattic/amp-wp/pulls/1286"},"html":{"href":"https://github.com/Automattic/amp-wp/pull/1286"},"issue":{"href":"https://api.github.com/repos/Automattic/amp-wp/issues/1286"},"comments":{"href":"https://api.github.com/repos/Automattic/amp-wp/issues/1286/comments"},"review_comments":{"href":"https://api.github.com/repos/Automattic/amp-wp/pulls/1286/comments"},"review_comment":{"href":"https://api.github.com/repos/Automattic/amp-wp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Automattic/amp-wp/pulls/1286/commits"},"statuses":{"href":"https://api.github.com/repos/Automattic/amp-wp/statuses/c0cf5929627cd9313e1b10f8c500293d9f4956e1"}},"author_association":"COLLABORATOR","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"westonruter","id":134745,"node_id":"MDQ6VXNlcjEzNDc0NQ==","avatar_url":"https://avatars2.githubusercontent.com/u/134745?v=4","gravatar_id":"","url":"https://api.github.com/users/westonruter","html_url":"https://github.com/westonruter","followers_url":"https://api.github.com/users/westonruter/followers","following_url":"https://api.github.com/users/westonruter/following{/other_user}","gists_url":"https://api.github.com/users/westonruter/gists{/gist_id}","starred_url":"https://api.github.com/users/westonruter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/westonruter/subscriptions","organizations_url":"https://api.github.com/users/westonruter/orgs","repos_url":"https://api.github.com/users/westonruter/repos","events_url":"https://api.github.com/users/westonruter/events{/privacy}","received_events_url":"https://api.github.com/users/westonruter/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":15,"deletions":7,"changed_files":3}}
{"actor":{"display_login":"westonruter"}}