-
-
Notifications
You must be signed in to change notification settings - Fork 115
Closed
Description
Prettier-Java 2.7.3
--print-width 100Input:
public abstract class Foo implements MyInterface {
@Override
public String foo() {
return left instanceof A
? right
: right instanceof B
? left
: left != null && right != null
? new C(left, right)
: null;
}
}Output:
public abstract class Foo implements MyInterface {
@Override
public String foo() {
return left instanceof A
? right
: right instanceof B ? left : left != null && right != null ? new C(left, right) : null;
}
}Expected behavior:
public abstract class Foo implements MyInterface {
@Override
public String foo() {
return left instanceof A
? right
: right instanceof B
? left
: left != null && right != null
? new C(left, right)
: null;
}
}Which is what Prettier for JavaScript does.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels