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

feat: no extra space in patterns

This commit is contained in:
Kevin Amado 2022-02-16 20:07:55 -05:00
parent 76e9af334d
commit 02e4ce14d9
No known key found for this signature in database
GPG key ID: FFF341057F503148
4 changed files with 14 additions and 13 deletions

View file

@ -153,8 +153,9 @@ pub fn rule(
// }
let child = children.get_next().unwrap();
steps.push_back(crate::builder::Step::Dedent);
if !has_comments_between_curly_b && items_count <= 1 {
if !has_comments_between_curly_b && items_count == 1 {
steps.push_back(crate::builder::Step::Whitespace);
} else if !has_comments_between_curly_b && items_count == 0 {
} else {
if let rnix::SyntaxKind::NODE_PAT_ENTRY = last_kind {
steps.push_back(crate::builder::Step::Token(