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.source("end", node.loc);
|
||||
|
||||
if (!this.endsWith("\n")) this.newline();
|
||||
|
||||
this.rightBrace();
|
||||
} else {
|
||||
this.source("end", node.loc);
|
||||
|
||||
@ -42,6 +42,8 @@ export function ClassBody(node: Object) {
|
||||
this.printSequence(node.body, node);
|
||||
this.dedent();
|
||||
|
||||
if (!this.endsWith("\n")) this.newline();
|
||||
|
||||
this.rightBrace();
|
||||
}
|
||||
}
|
||||
|
||||
@ -76,8 +76,6 @@ export default class Printer {
|
||||
*/
|
||||
|
||||
rightBrace(): void {
|
||||
if (!this.endsWith("\n")) this.newline();
|
||||
|
||||
if (this.format.minified) {
|
||||
this._buf.removeLastSemicolon();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user