@import regexp error
edriang opened this issue · 2 comments
edriang commented
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 commented
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 commented
Will take a look into this.