mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
formatter: fix indentation for multi-line lambdas in pipeline expression
This commit is contained in:
parent
802cf20637
commit
d9d708fc94
3 changed files with 64 additions and 6 deletions
|
|
@ -145,7 +145,10 @@ impl<'a> Formattable for Expr<'a> {
|
|||
}
|
||||
|
||||
let next_indent = if starts_with_newline(sub_expr) || should_add_newlines {
|
||||
indent + INDENT
|
||||
match sub_expr {
|
||||
Expr::Closure(..) | Expr::SpaceAfter(Closure(..), ..) => indent,
|
||||
_ => indent + INDENT,
|
||||
}
|
||||
} else {
|
||||
indent
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue