-
Notifications
You must be signed in to change notification settings - Fork 60
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
Google fonts @import url() raises SelectorSyntaxError in parse_simple_selector #25
Comments
Hi. Anyway, could you provide sample code to reproduce the issue, and a full traceback? |
Ok, it appears that you’re asking cssselect to parse something that is not a Selector at all, which as expected gives a syntax error. I think the bug is in your code, which should do a better job at recognizing what is a style rule or not. This might be related to the fact that you’re parsing CSS with regexps. This is about parsing HTML, but I think it applies equally well here. Consider using an actual CSS parser like tinycss. With tinycss you can test |
Sorry for the mix up. By "you" in the previous message I mean premailer. |
Haha. Np. So it's an issue with premailer's parsing. Your library's not supposed to handle Thanks for the help. |
Got this error:
Expected selector, got <NUMBER '700' at 0>
I think it was caused by this line in my css:
@import url('https://fonts.googleapis.com/css?family=Lato:400,700,400italic|Signika:400,700');
I'm using premailer which uses your library.
The text was updated successfully, but these errors were encountered: