{"action":"opened","issue":{"url":"https://api.github.com/repos/zulip/zulip/issues/1522","repository_url":"https://api.github.com/repos/zulip/zulip","labels_url":"https://api.github.com/repos/zulip/zulip/issues/1522/labels{/name}","comments_url":"https://api.github.com/repos/zulip/zulip/issues/1522/comments","events_url":"https://api.github.com/repos/zulip/zulip/issues/1522/events","html_url":"https://github.com/zulip/zulip/issues/1522","id":168973799,"number":1522,"title":"Clean up CSS parser (follow up tasks)","user":{"login":"showell","id":142908,"avatar_url":"https://avatars.githubusercontent.com/u/142908?v=3","gravatar_id":"","url":"https://api.github.com/users/showell","html_url":"https://github.com/showell","followers_url":"https://api.github.com/users/showell/followers","following_url":"https://api.github.com/users/showell/following{/other_user}","gists_url":"https://api.github.com/users/showell/gists{/gist_id}","starred_url":"https://api.github.com/users/showell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/showell/subscriptions","organizations_url":"https://api.github.com/users/showell/orgs","repos_url":"https://api.github.com/users/showell/repos","events_url":"https://api.github.com/users/showell/events{/privacy}","received_events_url":"https://api.github.com/users/showell/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-02T19:56:07Z","updated_at":"2016-08-02T19:56:07Z","closed_at":null,"body":"See #1499 \r\n\r\nThere are a few todos to make the parser better:\r\n- Have exceptions include line number info.\r\n- Clean up CssNestedSection wonkiness.  (You will see Union annotations related to us having CssSection and CssNestedSection, and when I wrote this, I wasn't completely clear on where things like media sections lead to normal declaration blocks or new subsections.)\r\n- Add unit tests.  (We need to get a test runner for `tools/lib` code.)\r\n- Instead of treating pre_fluff/post_fluff as raw strings, turn them into objects, so that if our linters don't like how our whitespace/comments are formatted, we can get line numbers for them.\r\n- Be more rigorous about deciding whether \"fluff\" is attached to the current line or upcoming line, etc.  (And, on a similar note, figure out whether CssSection should include trailing whitespace.)\r\n- Do a more granular parse of selectors, including things like `input[type=\"text\"]`.\r\n\r\nSome of this stuff will happen organically as we build #1511 (the CSS/HTML cross checker), and some of it's not mission critical, but any cleanup here will be helpful.\r\n\r\nAlso, `tools/check-css` should be more intelligent about finding files to check, and it should support a modified flag.\r\n\r\n"}}
{"actor":{"display_login":"showell"}}