We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2c97f59 commit f0f1bd7Copy full SHA for f0f1bd7
tasks/amdserialize.js
@@ -44,8 +44,13 @@ module.exports = function (grunt) {
44
// Process images included in css with url() param.
45
if (/.css$/.test(filepath)) {
46
var fileDir = filepath.replace(/[^\/]*$/, "");
47
- var urlRE = /url\(['"]?([^\)'"]*)/g;
+ var urlRE = /url\(['"]?([^\)'"\?#]*)/g;
48
var match = null;
49
+
50
+ // This is needed in case of relative path using ../, because grunt.file.copy while try to go down to
51
+ // fileDir before going up with ../ So if fileDir does not exist grunt.file.copy fails.
52
+ grunt.file.mkdir(fileDir);
53
54
// Extra parenthesis in the while condition to silence jshint.
55
// The assignment is required here to access the matched groups of a global regexp.
56
while ((match = urlRE.exec(content))) {
0 commit comments