From dd83f03932c635fd9edde3c06560a1265feedddf Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Fri, 30 Oct 2026 17:51:13 +0100 Subject: [PATCH] Skip heredoc/nowdoc bodies when spacing attribute concat --- blink/internal/fixer/rules/concat_space.go | 7 +++++++ blink/internal/fixer/rules/concat_space_config_test.go | 1 + 2 files changed, 8 insertions(+) diff --git a/blink/internal/fixer/rules/concat_space.go b/blink/internal/fixer/rules/concat_space.go index be528bef42..5135f6d92b 100644 --- a/blink/internal/fixer/rules/concat_space.go +++ b/blink/internal/fixer/rules/concat_space.go @@ -93,6 +93,13 @@ func spaceAttributeConcat(value string, none bool) (string, bool) { } continue } + if c == '<' && strings.HasPrefix(value[i:], "<<<") { + if end := heredocEnd(value, i); end > i { + b = append(b, value[i:end]...) + i = end - 1 + continue + } + } if c == '\'' || c == '"' { quote = c b = append(b, c) diff --git a/blink/internal/fixer/rules/concat_space_config_test.go b/blink/internal/fixer/rules/concat_space_config_test.go index 3a5b7ada28..f81fb0f36c 100644 --- a/blink/internal/fixer/rules/concat_space_config_test.go +++ b/blink/internal/fixer/rules/concat_space_config_test.go @@ -19,6 +19,7 @@ func TestConcatSpaceConfigCases(t *testing.T) { {"float literal in attribute left alone", ConcatSpace{}, "