vincentmac/gulp-fingerprint

Regex captures `url()`

rdallasgray opened this issue · 1 comments

Hey -- the standard regex (https://github.com/vincentmac/gulp-fingerprint/blob/master/index.js#L22) uses the star operator to capture urls, which results in, e.g., url() being matched, with no capture group. That then causes a failure because the code here https://github.com/vincentmac/gulp-fingerprint/blob/master/index.js#L58 returns the match index, not the matched text.

This won't happen if you use the + operator instead.

Sorry I don't have time to create a PR or tests for this -- thought at least I could let you know.

It looks like the standard regex also captures and removes hash fragments and query strings, which isn't desired in my case. The replace mode seems to work better for me.