From 75a012361409349d0325c9232e0c8fe8d52de505 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 17 May 2021 12:41:48 +0300 Subject: fix: don't add extra whitespace around fields closes #8785 --- crates/syntax/src/ast/edit_in_place.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'crates/syntax') diff --git a/crates/syntax/src/ast/edit_in_place.rs b/crates/syntax/src/ast/edit_in_place.rs index 14624c682..2676ed8c9 100644 --- a/crates/syntax/src/ast/edit_in_place.rs +++ b/crates/syntax/src/ast/edit_in_place.rs @@ -378,6 +378,10 @@ impl ast::RecordExprFieldList { make::tokens::single_space() }; + if is_multiline { + normalize_ws_between_braces(self.syntax()); + } + let position = match self.fields().last() { Some(last_field) => { let comma = match last_field -- cgit v1.2.3