Include newline insertion in the call sites of rightBrace.
This commit is contained in:
parent
0e05e9f216
commit
6bf52b74c0
@ -24,6 +24,9 @@ export function BlockStatement(node: Object) {
|
|||||||
this.removeTrailingNewline();
|
this.removeTrailingNewline();
|
||||||
|
|
||||||
this.source("end", node.loc);
|
this.source("end", node.loc);
|
||||||
|
|
||||||
|
if (!this.endsWith("\n")) this.newline();
|
||||||
|
|
||||||
this.rightBrace();
|
this.rightBrace();
|
||||||
} else {
|
} else {
|
||||||
this.source("end", node.loc);
|
this.source("end", node.loc);
|
||||||
|
|||||||
@ -42,6 +42,8 @@ export function ClassBody(node: Object) {
|
|||||||
this.printSequence(node.body, node);
|
this.printSequence(node.body, node);
|
||||||
this.dedent();
|
this.dedent();
|
||||||
|
|
||||||
|
if (!this.endsWith("\n")) this.newline();
|
||||||
|
|
||||||
this.rightBrace();
|
this.rightBrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -76,8 +76,6 @@ export default class Printer {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
rightBrace(): void {
|
rightBrace(): void {
|
||||||
if (!this.endsWith("\n")) this.newline();
|
|
||||||
|
|
||||||
if (this.format.minified) {
|
if (this.format.minified) {
|
||||||
this._buf.removeLastSemicolon();
|
this._buf.removeLastSemicolon();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user