mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 13:59:08 +00:00
Fix formatting of if/else chains
This commit is contained in:
parent
2939780638
commit
a7e4861956
1 changed files with 5 additions and 1 deletions
|
@ -672,9 +672,13 @@ fn fmt_if<'a>(
|
|||
indent
|
||||
};
|
||||
|
||||
for (loc_condition, loc_then) in branches.iter() {
|
||||
for (i, (loc_condition, loc_then)) in branches.iter().enumerate() {
|
||||
let is_multiline_condition = loc_condition.is_multiline();
|
||||
|
||||
if i > 0 {
|
||||
buf.push_str("else ");
|
||||
}
|
||||
|
||||
buf.push_str("if");
|
||||
|
||||
if is_multiline_condition {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue