{"action":"created","issue":{"url":"https://api.github.com/repos/sabberworm/PHP-CSS-Parser/issues/105","repository_url":"https://api.github.com/repos/sabberworm/PHP-CSS-Parser","labels_url":"https://api.github.com/repos/sabberworm/PHP-CSS-Parser/issues/105/labels{/name}","comments_url":"https://api.github.com/repos/sabberworm/PHP-CSS-Parser/issues/105/comments","events_url":"https://api.github.com/repos/sabberworm/PHP-CSS-Parser/issues/105/events","html_url":"https://github.com/sabberworm/PHP-CSS-Parser/pull/105","id":162954521,"number":105,"title":"Add line number support in the sabberworm CSS parser","user":{"login":"sidkshatriya","id":638477,"avatar_url":"https://avatars.githubusercontent.com/u/638477?v=3","gravatar_id":"","url":"https://api.github.com/users/sidkshatriya","html_url":"https://github.com/sidkshatriya","followers_url":"https://api.github.com/users/sidkshatriya/followers","following_url":"https://api.github.com/users/sidkshatriya/following{/other_user}","gists_url":"https://api.github.com/users/sidkshatriya/gists{/gist_id}","starred_url":"https://api.github.com/users/sidkshatriya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sidkshatriya/subscriptions","organizations_url":"https://api.github.com/users/sidkshatriya/orgs","repos_url":"https://api.github.com/users/sidkshatriya/repos","events_url":"https://api.github.com/users/sidkshatriya/events{/privacy}","received_events_url":"https://api.github.com/users/sidkshatriya/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-06-29T15:24:10Z","updated_at":"2016-06-29T19:26:33Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/sabberworm/PHP-CSS-Parser/pulls/105","html_url":"https://github.com/sabberworm/PHP-CSS-Parser/pull/105","diff_url":"https://github.com/sabberworm/PHP-CSS-Parser/pull/105.diff","patch_url":"https://github.com/sabberworm/PHP-CSS-Parser/pull/105.patch"},"body":"AMP HTML is a restricted subset of HTML (See https://www.ampproject.org/ for more details) and the AMP PHP Library provide validation and HTML to AMP HTML conversion utilities. We're using the `masterminds/html5-php` library to parse HTML5 and we're using `sabberworm/php-css-parser` to parse the CSS in the [AMP PHP Library](https://github.com/Lullabot/amp-library)\r\n\r\nAfter parsing the CSS parse we report any problems in the CSS (for e.g. `!important` is disallowed in the AMP dialect of HTML, we use the `sabberworm` parser to find all the uses of `!important` for instance)\r\n\r\nNow the CSS supplied by the user could be hundreds / thousands of lines long. So its not useful to simply say that `!important` was used and is not allowed. We should be able to say _which line_ the problem occurred.\r\n\r\nThis pull request adds support for line numbers. Here is how we're using this https://github.com/Lullabot/amp-library/pull/80#issuecomment-222695630\r\nNotice the line numbers reported in the validation errors which coming from code submitted in this PR.\r\n\r\nWould greatly appreciate if you had a look and merge it if you believe this feature would be useful. Hopefully the code changes have not missed anything out.\r\n\r\nThanks for this useful library BTW."},"comment":{"url":"https://api.github.com/repos/sabberworm/PHP-CSS-Parser/issues/comments/229461891","html_url":"https://github.com/sabberworm/PHP-CSS-Parser/pull/105#issuecomment-229461891","issue_url":"https://api.github.com/repos/sabberworm/PHP-CSS-Parser/issues/105","id":229461891,"user":{"login":"sabberworm","id":47652,"avatar_url":"https://avatars.githubusercontent.com/u/47652?v=3","gravatar_id":"","url":"https://api.github.com/users/sabberworm","html_url":"https://github.com/sabberworm","followers_url":"https://api.github.com/users/sabberworm/followers","following_url":"https://api.github.com/users/sabberworm/following{/other_user}","gists_url":"https://api.github.com/users/sabberworm/gists{/gist_id}","starred_url":"https://api.github.com/users/sabberworm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sabberworm/subscriptions","organizations_url":"https://api.github.com/users/sabberworm/orgs","repos_url":"https://api.github.com/users/sabberworm/repos","events_url":"https://api.github.com/users/sabberworm/events{/privacy}","received_events_url":"https://api.github.com/users/sabberworm/received_events","type":"User","site_admin":false},"created_at":"2016-06-29T19:26:33Z","updated_at":"2016-06-29T19:26:33Z","body":"Wow, thanks for your work. I will review soon…\r\n\r\nMaybe you could add a unit test dealing specifically with line numbers and refactor the one you changed to ignore the line numbers so it doesn’t break when we change the source?"}}
{"actor":{"display_login":"sabberworm"}}