Fix newlines before the update suffix operator in babel-generator (#6259)
This commit is contained in:
@@ -33,7 +33,9 @@ export function UpdateExpression(node: Object) {
|
||||
this.token(node.operator);
|
||||
this.print(node.argument, node);
|
||||
} else {
|
||||
this.startTerminatorless(true);
|
||||
this.print(node.argument, node);
|
||||
this.endTerminatorless();
|
||||
this.token(node.operator);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
++i;
|
||||
i++;
|
||||
(foo++).test();
|
||||
obj.foo/*comment*/++;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
++i;
|
||||
i++;
|
||||
(foo++).test();
|
||||
(foo++).test();
|
||||
obj.foo /*comment*/++;
|
||||
|
||||
Reference in New Issue
Block a user