1
Fork 0
mirror of https://github.com/RGBCube/alejandra synced 2025-08-01 04:57:44 +00:00

feat: no extra space in lists

This commit is contained in:
Kevin Amado 2022-02-16 19:59:20 -05:00
parent 1f01ac6ea9
commit 9606793fe2
No known key found for this signature in database
GPG key ID: FFF341057F503148
3 changed files with 7 additions and 7 deletions

View file

@ -69,7 +69,9 @@ pub fn rule(
)); ));
} }
crate::config::Layout::Wide => { crate::config::Layout::Wide => {
steps.push_back(crate::builder::Step::Whitespace); if item_index > 1 {
steps.push_back(crate::builder::Step::Whitespace);
}
steps steps
.push_back(crate::builder::Step::Format(child.element)); .push_back(crate::builder::Step::Format(child.element));
} }
@ -87,9 +89,7 @@ pub fn rule(
steps.push_back(crate::builder::Step::NewLine); steps.push_back(crate::builder::Step::NewLine);
steps.push_back(crate::builder::Step::Pad); steps.push_back(crate::builder::Step::Pad);
} }
crate::config::Layout::Wide => { crate::config::Layout::Wide => {}
steps.push_back(crate::builder::Step::Whitespace);
}
} }
steps.push_back(crate::builder::Step::Format(child.element)); steps.push_back(crate::builder::Step::Format(child.element));

View file

@ -19,7 +19,7 @@
url = "example/${version}"; url = "example/${version}";
}; };
meta = with lib; { meta = with lib; {
maintainers = with maintainers; [ someone ]; maintainers = with maintainers; [someone];
description = "something"; description = "something";
}; };
} }

View file

@ -1,11 +1,11 @@
[ [
[ 1 ] [1]
[ [
1 1
] ]
[ b d ] [b d]
[ [
b b
d d