mirror of
https://github.com/beautifier/js-beautify.git
synced 2024-11-27 14:40:23 +00:00
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:
parent
210dd48ae7
commit
b63dc533e7
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user