1
Fork 0
mirror of https://github.com/RGBCube/alejandra synced 2025-07-31 12:37:45 +00:00

feat: do not indent second bin op

This commit is contained in:
Kevin Amado 2022-01-31 20:41:02 -05:00
parent 9d6a9fc90b
commit af6c62da14
No known key found for this signature in database
GPG key ID: FFF341057F503148
3 changed files with 92 additions and 94 deletions

View file

@ -27,7 +27,6 @@ pub fn rule(
));
}
}
steps.push_back(crate::builder::Step::Indent);
steps.push_back(crate::builder::Step::NewLine);
steps.push_back(crate::builder::Step::Pad);
}
@ -74,7 +73,6 @@ pub fn rule(
match layout {
crate::config::Layout::Tall => {
steps.push_back(crate::builder::Step::FormatWider(child.element));
steps.push_back(crate::builder::Step::Dedent);
}
crate::config::Layout::Wide => {
steps.push_back(crate::builder::Step::Format(child.element));

View file

@ -2,62 +2,62 @@
(1 + 1)
(
1
+
/**/
+
/**/
1
)
(
1
/**/
+ 1
)
(
1
/**/
+
/**/
1
)
(
1
/**/
+
/**/
(
1
)
(
1
/**/
+ 1
)
(
1
/**/
+
/**/
1
)
(
1
/**/
+
/**/
(
1
/**/
+
/**/
(
1
/**/
+
/**/
1
)
/**/
+
/**/
1
)
)
)
(1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1)
(
1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
)
]

View file

@ -2,62 +2,62 @@
(a ? a)
(
a
?
/**/
?
/**/
a
)
(
a
/**/
? a
)
(
a
/**/
?
/**/
a
)
(
a
/**/
?
/**/
(
a
)
(
a
/**/
? a
)
(
a
/**/
?
/**/
a
)
(
a
/**/
?
/**/
(
a
/**/
?
/**/
(
a
/**/
?
/**/
a
)
/**/
?
/**/
a
)
)
)
(a ? a ? a ? a ? a ? a ? a ? a ? a ? a ? a ? a ? a ? a ? a ? a ? a ? a ? a)
(
a
? a
? a
? a
? a
? a
? a
? a
? a
? a
? a
? a
? a
? a
? a
? a
? a
? a
? a
? a
? a
? a
? a
? a
? a
? a
? a
? a
? a
? a
? a
? a
? a
? a
? a
? a
? a
? a
? a
)
]