Handle CSS-comments better in the preprocess-function (PR 14963 follow-up)
This fixes another oversight, please see the updated tests.
This commit is contained in:
parent
1ac33c960d
commit
397f2e63d0
5
external/builder/builder.js
vendored
5
external/builder/builder.js
vendored
@ -209,7 +209,10 @@ function preprocess(inFilename, outFilename, defines) {
|
||||
!stack.includes(STATE_ELSE_FALSE)
|
||||
) {
|
||||
writeLine(
|
||||
line.replace(/^\/\/|^\/\*|^<!--/g, " ").replace(/\*\/$|-->$/g, "")
|
||||
line
|
||||
.replace(/^\/\/|^<!--/g, " ")
|
||||
.replace(/(^\s*)\/\*/g, "$1 ")
|
||||
.replace(/\*\/$|-->$/g, "")
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
/* Comment here... */
|
||||
div {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
1
external/builder/fixtures/css-comment.css
vendored
1
external/builder/fixtures/css-comment.css
vendored
@ -2,5 +2,6 @@
|
||||
/*#if TRUE*/
|
||||
/*div {*/
|
||||
/* margin: 0;*/
|
||||
/*padding: 0;*/
|
||||
/*}*/
|
||||
/*#endif*/
|
||||
|
Loading…
Reference in New Issue
Block a user