mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
Fix top-level expect
formatting bugs
This commit is contained in:
parent
862b58b8f9
commit
a3e441c086
1 changed files with 6 additions and 2 deletions
|
@ -288,14 +288,18 @@ fn fmt_expect<'a, 'buf>(
|
||||||
is_multiline: bool,
|
is_multiline: bool,
|
||||||
indent: u16,
|
indent: u16,
|
||||||
) {
|
) {
|
||||||
|
buf.ensure_ends_with_newline();
|
||||||
|
buf.indent(indent);
|
||||||
|
buf.push_str("expect");
|
||||||
|
|
||||||
let return_indent = if is_multiline {
|
let return_indent = if is_multiline {
|
||||||
|
buf.newline();
|
||||||
indent + INDENT
|
indent + INDENT
|
||||||
} else {
|
} else {
|
||||||
|
buf.spaces(1);
|
||||||
indent
|
indent
|
||||||
};
|
};
|
||||||
|
|
||||||
buf.ensure_ends_with_newline();
|
|
||||||
buf.push_str("expect");
|
|
||||||
condition.format(buf, return_indent);
|
condition.format(buf, return_indent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue