From cb156c30c1072b40ed66cd1defe83975aa4ce1f1 Mon Sep 17 00:00:00 2001 From: Philipp A Date: Mon, 14 Aug 2023 09:30:59 +0200 Subject: [PATCH] fix code --- crates/taplo/src/formatter/mod.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/crates/taplo/src/formatter/mod.rs b/crates/taplo/src/formatter/mod.rs index f131b67c6..1a77ec653 100644 --- a/crates/taplo/src/formatter/mod.rs +++ b/crates/taplo/src/formatter/mod.rs @@ -1106,10 +1106,8 @@ fn format_array(node: SyntaxNode, options: &Options, context: &Context) -> impl skip_newlines = 0; } - if !formatted.ends_with(']') { - formatted - .extend(options.newlines(newline_count.saturating_sub(skip_newlines))); - } + formatted + .extend(options.newlines(newline_count.saturating_sub(skip_newlines))); } COMMENT => { let newline_before = t