chore: Use ES6 template strings in CSS and code generators (#5902)

* Unindent CSS, save 3 kb of code.
* Convert generator functions to template strings. 
This resolves #5761.
This commit is contained in:
Neil Fraser
2022-01-28 17:58:43 -08:00
committed by GitHub
parent a31003fab9
commit 1f6a1bd8d9
39 changed files with 2194 additions and 2062 deletions

View File

@@ -28,8 +28,7 @@ Lua['controls_if'] = function(block) {
let branchCode = Lua.statementToCode(block, 'DO' + n);
if (Lua.STATEMENT_SUFFIX) {
branchCode = Lua.prefixLines(
Lua.injectId(Lua.STATEMENT_SUFFIX, block), Lua.INDENT) +
branchCode;
Lua.injectId(Lua.STATEMENT_SUFFIX, block), Lua.INDENT) + branchCode;
}
code +=
(n > 0 ? 'else' : '') + 'if ' + conditionCode + ' then\n' + branchCode;