Prevent the (old) preprocessor from appending trailing whitespace when removing closing HTML comments
This can currently be seen in the *built* `web/viewer.html` file, at the line containing " <script src="viewer.js"></script> ".
This commit is contained in:
parent
c9934de87c
commit
85a67456ed
2
external/builder/builder.js
vendored
2
external/builder/builder.js
vendored
@ -181,7 +181,7 @@ 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, " "));
|
writeLine(line.replace(/^\/\/|^<!--/g, " ").replace(/-->$/g, ""));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user