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

feat: no extra space in attr-sets

This commit is contained in:
Kevin Amado 2022-02-16 20:02:57 -05:00
parent 9606793fe2
commit 76e9af334d
No known key found for this signature in database
GPG key ID: FFF341057F503148
4 changed files with 9 additions and 7 deletions

View file

@ -127,7 +127,9 @@ pub fn rule(
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); if items_count > 0 {
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

@ -1,5 +1,5 @@
[ [
{ } {}
{ {
/* /*
a a
@ -101,7 +101,7 @@
a = { a = {
a = rec { a = rec {
a = { a = {
a = rec { a = { a = rec { a = { a = rec { a = { }; }; }; }; }; }; a = rec { a = { a = rec { a = { a = rec { a = {}; }; }; }; }; };
}; };
}; };
}; };

View file

@ -94,13 +94,13 @@ rec
b = 1; b = 1;
c = 2; c = 2;
}; };
n = pkgs: { }; n = pkgs: {};
o = o =
{ {
pkgs, pkgs,
... ...
}: }:
{ }; {};
a a
/* /*
@ -117,6 +117,6 @@ rec
; ;
p = p =
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa { } aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa {}
a; a;
} }

View file

@ -57,7 +57,7 @@
) )
( (
{ {
pkgs ? import ./.. { }, pkgs ? import ./.. {},
locationsXml, locationsXml,
}: }:
null null