cssFx icon indicating copy to clipboard operation
cssFx copied to clipboard

@import regexp error

Open edriang opened this issue 12 years ago • 2 comments

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 avatar Jan 20 '14 19:01 edriang

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

edriang avatar Jan 20 '14 19:01 edriang

Will take a look into this.

imsky avatar Jan 23 '14 16:01 imsky