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

@import regexp error #16

Open
edriang opened this issue Jan 20, 2014 · 2 comments
Open

@import regexp error #16

edriang opened this issue Jan 20, 2014 · 2 comments

Comments

@edriang
Copy link

edriang commented Jan 20, 2014

This is the RegExp used when finding @import statements:

/@import\s+(?:url(['"]?(.)['"]?))\s;?/gim;

The problem is that the resulting url sometimes include "double quotes", so then the browser outputs a 404 error.

It works anyway, but the error is uggly.

You can change, for example, the "(.)" part for something like ([^\")]

Thanks

@edriang
Copy link
Author

edriang commented Jan 20, 2014

I don't know why, but the post remove some parts of the regexp. I'm talking about line #155, and the solutions is to use a diferent selector than (.)* because it also select last quotes. Thanks again

@imsky
Copy link
Owner

imsky commented Jan 23, 2014

Will take a look into this.

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

No branches or pull requests

2 participants