beautify: indent "{" after newline like its parent block

This commit is contained in:
tophf 2017-05-18 01:54:56 +03:00
parent b2ab3d45ad
commit dacca58d26

View File

@ -304,6 +304,7 @@
newline_before_open_brace ? print.newLine() : print.singleSpace(); newline_before_open_brace ? print.newLine() : print.singleSpace();
output.push(ch); output.push(ch);
outputPosCol++; outputPosCol++;
indent();
if (!eatWhitespace(true)) { if (!eatWhitespace(true)) {
newline_after_open_brace ? print.newLine() : print.singleSpace(); newline_after_open_brace ? print.newLine() : print.singleSpace();
} }
@ -462,7 +463,6 @@
print.newLine(true); print.newLine(true);
} }
} else { } else {
indent();
print["{"](ch); print["{"](ch);
// when entering conditional groups, only rulesets are allowed // when entering conditional groups, only rulesets are allowed
if (enteringConditionalGroup) { if (enteringConditionalGroup) {