mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 15:21:12 +00:00
fix formating newlines
This commit is contained in:
parent
7361f62902
commit
aa3ce94f86
3 changed files with 73 additions and 11 deletions
|
@ -38,10 +38,21 @@ impl<'a> Formattable<'a> for Def<'a> {
|
|||
loc_pattern.format(buf, indent);
|
||||
if loc_annotation.is_multiline() {
|
||||
buf.push_str(" :");
|
||||
loc_annotation.format_with_options(
|
||||
buf,
|
||||
Parens::NotNeeded,
|
||||
Newlines::Yes,
|
||||
indent,
|
||||
);
|
||||
} else {
|
||||
buf.push_str(" : ");
|
||||
loc_annotation.format_with_options(
|
||||
buf,
|
||||
Parens::NotNeeded,
|
||||
Newlines::No,
|
||||
indent,
|
||||
);
|
||||
}
|
||||
loc_annotation.format(buf, indent);
|
||||
}
|
||||
Alias { name, vars, ann } => {
|
||||
buf.push_str(name.value);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue