mirror of
https://github.com/danbulant/oxc
synced 2026-05-24 12:21:58 +00:00
fix(prettier) if statement closing bracket indentation (#1396)
This commit is contained in:
parent
39341e4688
commit
08f00cbd82
1 changed files with 3 additions and 3 deletions
|
|
@ -122,7 +122,7 @@ impl<'a> Format<'a> for IfStatement<'a> {
|
|||
let opening = group![
|
||||
p,
|
||||
ss!("if ("),
|
||||
group!(p, indent!(p, softline!(), format!(p, self.test), softline!())),
|
||||
group!(p, indent!(p, softline!(), format!(p, self.test)), softline!()),
|
||||
ss!(")"),
|
||||
consequent
|
||||
];
|
||||
|
|
@ -242,7 +242,7 @@ impl<'a> Format<'a> for WhileStatement<'a> {
|
|||
let mut parts = p.vec();
|
||||
|
||||
parts.push(ss!("while ("));
|
||||
parts.push(group!(p, indent!(p, softline!(), format!(p, self.test), softline!())));
|
||||
parts.push(group!(p, indent!(p, softline!(), format!(p, self.test)), softline!()));
|
||||
parts.push(ss!(")"));
|
||||
|
||||
let body = format!(p, self.body);
|
||||
|
|
@ -269,7 +269,7 @@ impl<'a> Format<'a> for DoWhileStatement<'a> {
|
|||
}
|
||||
|
||||
parts.push(ss!("while ("));
|
||||
parts.push(group!(p, indent!(p, softline!(), format!(p, self.test), softline!())));
|
||||
parts.push(group!(p, indent!(p, softline!(), format!(p, self.test)), softline!()));
|
||||
parts.push(ss!(")"));
|
||||
if p.options.semi {
|
||||
parts.push(ss!(";"));
|
||||
|
|
|
|||
Loading…
Reference in a new issue