Skip to content

Commit

Permalink
Prevent request names from breaking comments
Browse files Browse the repository at this point in the history
Using `/*` as comment delimiters allows request names to terminate a comment early, like in carteb/carte-blanche#262.
  • Loading branch information
wmertens committed Jun 7, 2016
1 parent 3580ec9 commit 2596b32
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions lib/ModuleFilenameHelpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,20 +101,18 @@ ModuleFilenameHelpers.createFooter = function createFooter(module, requestShorte
if(!module) module = "";
if(typeof module === "string") {
return [
"/** WEBPACK FOOTER **",
" ** " + requestShortener.shorten(module),
" **/"
"// WEBPACK FOOTER //",
"// " + requestShortener.shorten(module)
].join("\n");
} else {
return [
"/*****************",
" ** WEBPACK FOOTER",
" ** " + module.readableIdentifier(requestShortener),
" ** module id = " + module.id,
" ** module chunks = " + module.chunks.map(function(c) {
"//////////////////",
"// WEBPACK FOOTER",
"// " + module.readableIdentifier(requestShortener),
"// module id = " + module.id,
"// module chunks = " + module.chunks.map(function(c) {
return c.id;
}).join(" "),
" **/"
}).join(" ")
].join("\n");
}
};
Expand Down

0 comments on commit 2596b32

Please sign in to comment.