Skip to content

Commit

Permalink
feat: expand multi element attr sets
Browse files Browse the repository at this point in the history
  • Loading branch information
kamadorueda committed Jan 29, 2022
1 parent dd5defc commit d4decc9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/rules/attr_set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ pub fn rule(

let layout = if children.has_comments() {
&crate::config::Layout::Tall
} else if node
.children()
.filter(|node| node.kind() == rnix::SyntaxKind::NODE_KEY_VALUE)
.count()
> 1
{
&crate::config::Layout::Tall
} else {
build_ctx.config.layout()
};
Expand Down

0 comments on commit d4decc9

Please sign in to comment.