mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 05:49:08 +00:00
Fix unstable formatting with nested applies
This commit is contained in:
parent
2bb3b84ce7
commit
8690a02d8f
1 changed files with 10 additions and 2 deletions
|
@ -701,8 +701,16 @@ fn fmt_apply(
|
|||
if !expr.before.is_empty() {
|
||||
format_spaces(buf, expr.before, Newlines::Yes, indent);
|
||||
}
|
||||
expr.item
|
||||
.format_with_options(buf, Parens::InApply, Newlines::Yes, indent);
|
||||
expr.item.format_with_options(
|
||||
buf,
|
||||
if use_commas_and_parens {
|
||||
Parens::NotNeeded
|
||||
} else {
|
||||
Parens::InApply
|
||||
},
|
||||
Newlines::Yes,
|
||||
indent,
|
||||
);
|
||||
|
||||
if use_commas_and_parens {
|
||||
buf.push('(');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue