From cb51571b5b1157e2af7e19fc63ddd1c4cb6a2d38 Mon Sep 17 00:00:00 2001 From: Finn Evers Date: Wed, 14 Jan 2026 18:06:16 +0100 Subject: [PATCH] html: Exclude all brackets from bracket colorization (#46808) Closes #45755 Rainbow brackets in HTML files do not really make sense - a tag is always enclosed in angled brackets. With our current approach, that means that we will highlight all brackets in HTML files with the same color, because well, these angled brackets do not quite behave like in other languages. Hence, let themes color this again and just exluce HTML angled brackets from rainbow bracket colorization, as it is no real rainbow bracket colorization anyway. Release Notes: - N/A --- extensions/html/languages/html/brackets.scm | 26 +++++++++++++++++---- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/extensions/html/languages/html/brackets.scm b/extensions/html/languages/html/brackets.scm index 53d6a6bb23..adc11a1d74 100644 --- a/extensions/html/languages/html/brackets.scm +++ b/extensions/html/languages/html/brackets.scm @@ -1,5 +1,21 @@ -("<" @open "/>" @close) -("" @close) -("<" @open ">" @close) -(("\"" @open "\"" @close) (#set! rainbow.exclude)) -((element (start_tag) @open (end_tag) @close) (#set! newline.only) (#set! rainbow.exclude)) +(("<" @open + "/>" @close) + (#set! rainbow.exclude)) + +(("" @close) + (#set! rainbow.exclude)) + +(("<" @open + ">" @close) + (#set! rainbow.exclude)) + +(("\"" @open + "\"" @close) + (#set! rainbow.exclude)) + +((element + (start_tag) @open + (end_tag) @close) + (#set! newline.only) + (#set! rainbow.exclude))