Skip to content

Commit 8c08327

Browse files
authored
[fix] Properly multiline multi-statement ParenNode expressions (#867)
1 parent a256706 commit 8c08327

3 files changed

Lines changed: 17 additions & 1 deletion

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
(true; true)
2+
3+
cond1 &&
4+
(pattern_match_me => { foo: }; true) &&
5+
cond3
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
(
2+
true
3+
true
4+
)
5+
6+
cond1 &&
7+
(
8+
pattern_match_me => {foo:}
9+
true
10+
) &&
11+
cond3

librubyfmt/src/format_prism.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3126,7 +3126,7 @@ fn format_parentheses_node<'src>(
31263126
format_node(ps, stmt);
31273127
});
31283128
if idx < statements.len() - 1 {
3129-
ps.emit_soft_newline();
3129+
ps.emit_newline();
31303130
}
31313131
}
31323132
} else {

0 commit comments

Comments
 (0)