Skip to content

Commit

Permalink
Replace filenames globally in file (in case of multiple occurrences)
Browse files Browse the repository at this point in the history
  • Loading branch information
Frique committed Nov 18, 2014
1 parent 2a1185e commit a7431df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tasks/wp-rev.js
Expand Up @@ -40,7 +40,7 @@ module.exports = function (grunt) {
regex = new RegExp('([0-9a-f]*\\.)*?' + filename),
content = grunt.file.read(options.file);

content = content.replace(regex, prefix + '.' + filename.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&'));
content = content.replace(regex, prefix + '.' + filename.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&'), 'g');
grunt.verbose.ok().ok(hash);
fs.renameSync(f, outPath);
grunt.log.write(f + ' ').ok(renamed);
Expand Down

0 comments on commit a7431df

Please sign in to comment.