don't add a newline between "{" and "}" when there is nothing in-between

before ".tabs {}" resulted in ".tabs {\n}". The rule is of course useless but a popular starting point
This commit is contained in:
Thorben Bochenek 2013-10-14 16:36:56 +02:00
parent 210dd48ae7
commit b63dc533e7

View File

@ -201,8 +201,14 @@
print.newLine();
}
} else if (ch === '{') {
indent();
print["{"](ch);
eatWhitespace();
if (peek() == '}') {
next();
output.push(" {}");
} else {
indent();
print["{"](ch);
}
} else if (ch === '}') {
outdent();
print["}"](ch);