From 3fde1587d0850d46b5a1473e5d1e59254e947496 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Sat, 1 Jul 2023 12:17:39 +0200 Subject: [PATCH] fix(html): distinguish levels --- queries/html_tags/highlights.scm | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/queries/html_tags/highlights.scm b/queries/html_tags/highlights.scm index f44a853b0..e789fd922 100644 --- a/queries/html_tags/highlights.scm +++ b/queries/html_tags/highlights.scm @@ -7,7 +7,25 @@ (text) @text @spell ((element (start_tag (tag_name) @_tag) (text) @text.title) - (#match? @_tag "^(h[0-9]|title)$")) + (#eq? @_tag "title")) + +((element (start_tag (tag_name) @_tag) (text) @text.title.1) + (#eq? @_tag "h1")) + +((element (start_tag (tag_name) @_tag) (text) @text.title.2) + (#eq? @_tag "h2")) + +((element (start_tag (tag_name) @_tag) (text) @text.title.3) + (#eq? @_tag "h3")) + +((element (start_tag (tag_name) @_tag) (text) @text.title.4) + (#eq? @_tag "h4")) + +((element (start_tag (tag_name) @_tag) (text) @text.title.5) + (#eq? @_tag "h5")) + +((element (start_tag (tag_name) @_tag) (text) @text.title.6) + (#eq? @_tag "h6")) ((element (start_tag (tag_name) @_tag) (text) @text.strong) (#any-of? @_tag "strong" "b"))