callumlocke / grunt-cdnify

Grunt plugin for finding and modifying static resource URLs
61 stars 40 forks source link

Css Property regular expression is missing { #9

Closed ezraroi closed 9 years ago

ezraroi commented 10 years ago

If the css property is the first one in the block, e.g:

.test {background-image:url(_____)}

The regular expression will miss it as it is expecting ';' or white space at the beginning.

I fixed it by adding {

var cssPropertyMatcher = /[;\s{]*?[a-zA-Z-]+\s*:\s*url(\s*['"]?[^'")\s]+['"]?\s*)[^;}]*/g;
callumlocke commented 10 years ago

this looks good, could you do a pr?

ezraroi commented 10 years ago

Hi, i have made a Pull Request to the css-url-rewriter repository. once you will merge it and release a new version just update the package.json of the grunt-cdnify to use the new version

Thanks

XhmikosR commented 9 years ago

Fixed usptream.