js: emit non-breaking whitespace before function arrow in remaining places

This commit is contained in:
Alexey Andreev 2024-09-03 20:54:34 +02:00
parent 9768a86378
commit d0707e5355
2 changed files with 2 additions and 2 deletions

View File

@ -127,7 +127,7 @@ public class TemplatingAstWriter extends AstWriter {
if (classInitializerInfo == null || classInitializerInfo.isDynamicInitializer(className)) { if (classInitializerInfo == null || classInitializerInfo.isDynamicInitializer(className)) {
writer.appendClassInit(className); writer.appendClassInit(className);
} else { } else {
writer.append("(()").ws().append("=>").ws().append("{})"); writer.append("(()").sameLineWs().append("=>").ws().append("{})");
} }
return true; return true;
} }

View File

@ -64,7 +64,7 @@ class JSAliasRenderer implements RendererListener, MethodContributor {
writer.startVariableDeclaration().appendFunction("$rt_jso_marker") writer.startVariableDeclaration().appendFunction("$rt_jso_marker")
.appendGlobal("Symbol").append("('jsoClass')").endDeclaration(); .appendGlobal("Symbol").append("('jsoClass')").endDeclaration();
writer.append("(()").ws().append("=>").ws().append("{").softNewLine().indent(); writer.append("(()").sameLineWs().append("=>").ws().append("{").softNewLine().indent();
writer.append("let c;").softNewLine(); writer.append("let c;").softNewLine();
var exportedNamesByClass = new HashMap<String, String>(); var exportedNamesByClass = new HashMap<String, String>();
for (var className : classSource.getClassNames()) { for (var className : classSource.getClassNames()) {