Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Jakefile.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
function extractScriptNames() {
console.log("Extracting script file names from index.html");

var regexScriptName = /<script src="(.*?)"><\/script>/g;
var regexScriptName = /<script src="(.*?)"><\/script[^>]*>/g;
Comment thread
erseco marked this conversation as resolved.
Dismissed
var scriptSection = regexScriptSection.exec(indexFile)[1];

// extract script names
Expand Down Expand Up @@ -107,7 +107,9 @@
// convert wildcard notation to proper regex
// *foo.jpg becomes ^.*foo\.jpg$
excludeFiles = excludeFiles.map(function(file) {
file = file.replace(/\./g, "\\.").replace("*", ".*", "g");
// * is deliberately left out of the escaped set: it is the wildcard,
// turned into .* on the next call.
file = file.replace(/[.+?^${}()|[\]\\]/g, "\\$&").replace(/\*/g, ".*");
file = "^" + file + "$";
return file;
});
Expand Down
Loading