csspool
csspool copied to clipboard
Gracefully Fail from Invalid Syntax
Running CSSPool against real-world poorly written syntax always results in errors like:
- parse error on value "}\n" (RBRACE)
- parse error on value ";" (SEMI)
- And selectors with ":not" return a 'parse error on value ":not(" (error)'
How do I make CSSPool just skip over the rule_set that it is having difficulties with? Thereby keeping all the valid CSS objects.
Thanks
Can you please attach some example of the types of CSS that you have seen causing the first two errors?
@Maedi Is there a test case that you can provide so I can handle this issue?
Note that the :not() selector's support will be added when #26 is resolved.
This CSS file fails https://gist.github.com/3910036.
Sorry, I don't have time to provide a more precise test case now. :(
Another example:
Racc::ParseError: parse error on value ";" (SEMI)
When parsing http://www.restorethegulf.gov/sites/default/files/css/css_ee40f25a5b9a23323f5a7cbad56dd21e.css