mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 05:49:08 +00:00
Fix newline after dbg formatting
This commit is contained in:
parent
4a0dce714b
commit
8c25c9aaf7
7 changed files with 70 additions and 1 deletions
|
@ -1387,10 +1387,26 @@ fn fmt_dbg_stmt<'a>(
|
|||
)
|
||||
.format_with_options(buf, parens, Newlines::Yes, indent);
|
||||
|
||||
let cont_lifted = expr_lift_spaces(Parens::NotNeeded, buf.text.bump(), &continuation.value);
|
||||
|
||||
if !cont_lifted.before.is_empty() {
|
||||
format_spaces(buf, cont_lifted.before, Newlines::Yes, indent);
|
||||
}
|
||||
|
||||
// Always put a newline after the `dbg` line(s)
|
||||
buf.ensure_ends_with_newline();
|
||||
|
||||
continuation.format(buf, indent);
|
||||
format_expr_only(
|
||||
&cont_lifted.item,
|
||||
buf,
|
||||
Parens::NotNeeded,
|
||||
Newlines::Yes,
|
||||
indent,
|
||||
);
|
||||
|
||||
if !cont_lifted.after.is_empty() {
|
||||
format_spaces(buf, cont_lifted.after, Newlines::Yes, indent);
|
||||
}
|
||||
}
|
||||
|
||||
fn fmt_return<'a>(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue