Handle CSS-comments correctly in the preprocess
-function (PR 14886 follow-up)
I overlooked this in PR 14886, sorry about that!
This commit is contained in:
parent
e6a0a953e8
commit
65fe0130f4
4
external/builder/builder.js
vendored
4
external/builder/builder.js
vendored
@ -208,7 +208,9 @@ function preprocess(inFilename, outFilename, defines) {
|
|||||||
!stack.includes(STATE_IF_FALSE) &&
|
!stack.includes(STATE_IF_FALSE) &&
|
||||||
!stack.includes(STATE_ELSE_FALSE)
|
!stack.includes(STATE_ELSE_FALSE)
|
||||||
) {
|
) {
|
||||||
writeLine(line.replace(/^\/\/|^<!--/g, " ").replace(/-->$/g, ""));
|
writeLine(
|
||||||
|
line.replace(/^\/\/|^\/\*|^<!--/g, " ").replace(/\*\/$|-->$/g, "")
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
4
external/builder/fixtures/css-comment-expected.css
vendored
Normal file
4
external/builder/fixtures/css-comment-expected.css
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
/* Comment here... */
|
||||||
|
div {
|
||||||
|
margin: 0;
|
||||||
|
}
|
6
external/builder/fixtures/css-comment.css
vendored
Normal file
6
external/builder/fixtures/css-comment.css
vendored
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
/* Comment here... */
|
||||||
|
/*#if TRUE*/
|
||||||
|
/*div {*/
|
||||||
|
/* margin: 0;*/
|
||||||
|
/*}*/
|
||||||
|
/*#endif*/
|
Loading…
x
Reference in New Issue
Block a user