Skip to content

Commit 85bb5e3

Browse files
wmertenscletusw
authored andcommitted
Prevent request names from breaking comments
Using `/*` as comment delimiters allows request names to terminate a comment early, like in carteb/carte-blanche#262.
1 parent cfa947e commit 85bb5e3

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

lib/ModuleFilenameHelpers.js

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -96,20 +96,18 @@ ModuleFilenameHelpers.createFooter = function createFooter(module, requestShorte
9696
if(!module) module = "";
9797
if(typeof module === "string") {
9898
return [
99-
"/** WEBPACK FOOTER **",
100-
" ** " + requestShortener.shorten(module),
101-
" **/"
99+
"// WEBPACK FOOTER //",
100+
"// " + requestShortener.shorten(module)
102101
].join("\n");
103102
} else {
104103
return [
105-
"/*****************",
106-
" ** WEBPACK FOOTER",
107-
" ** " + module.readableIdentifier(requestShortener),
108-
" ** module id = " + module.id,
109-
" ** module chunks = " + module.chunks.map(function(c) {
104+
"//////////////////",
105+
"// WEBPACK FOOTER",
106+
"// " + module.readableIdentifier(requestShortener),
107+
"// module id = " + module.id,
108+
"// module chunks = " + module.chunks.map(function(c) {
110109
return c.id;
111-
}).join(" "),
112-
" **/"
110+
}).join(" ")
113111
].join("\n");
114112
}
115113
};

0 commit comments

Comments
 (0)