Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gracefully Fail from Invalid Syntax #24

Open
maedi opened this issue Aug 5, 2012 · 4 comments
Open

Gracefully Fail from Invalid Syntax #24

maedi opened this issue Aug 5, 2012 · 4 comments

Comments

@maedi
Copy link

maedi commented Aug 5, 2012

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

@miketierney
Copy link
Member

Can you please attach some example of the types of CSS that you have seen causing the first two errors?

@miketierney
Copy link
Member

@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.

@sorich87
Copy link

This CSS file fails https://gist.github.com/3910036.

Sorry, I don't have time to provide a more precise test case now. :(

@sutch
Copy link

sutch commented Jul 27, 2013

Another example:

Racc::ParseError:
parse error on value ";" (SEMI)

When parsing http://www.restorethegulf.gov/sites/default/files/css/css_ee40f25a5b9a23323f5a7cbad56dd21e.css

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants