summaryrefslogtreecommitdiff
path: root/queries
diff options
context:
space:
mode:
Diffstat (limited to 'queries')
-rw-r--r--queries/html/highlights.scm28
-rw-r--r--queries/html/injections.scm5
2 files changed, 32 insertions, 1 deletions
diff --git a/queries/html/highlights.scm b/queries/html/highlights.scm
index f721440e..c7be2123 100644
--- a/queries/html/highlights.scm
+++ b/queries/html/highlights.scm
@@ -6,6 +6,32 @@
(quoted_attribute_value) @string
(comment) @comment
+((element (start_tag (tag_name) @_tag) (text) @text.title)
+ (#match? @_tag "^(h[0-9]|title)$"))
+
+((element (start_tag (tag_name) @_tag) (text) @text.strong)
+ (#match? @_tag "^(strong|b)$"))
+
+((element (start_tag (tag_name) @_tag) (text) @text.emphasis)
+ (#match? @_tag "^(em|i)$"))
+
+((element (start_tag (tag_name) @_tag) (text) @text.strike)
+ (#match? @_tag "^(s|del)$"))
+
+((element (start_tag (tag_name) @_tag) (text) @text.underline)
+ (#match? @_tag "^u$"))
+
+((element (start_tag (tag_name) @_tag) (text) @text.literal)
+ (#match? @_tag "^(code|kbd)$"))
+
+((element (start_tag (tag_name) @_tag) (text) @text.uri)
+ (#match? @_tag "^a$"))
+
+((attribute
+ (attribute_name) @_attr
+ (quoted_attribute_value (attribute_value) @text.uri))
+ (#match? @_attr "^href$"))
+
"=" @operator
[
@@ -14,4 +40,4 @@
">"
"</"
"/>"
- ] @tag.delimiter
+] @tag.delimiter
diff --git a/queries/html/injections.scm b/queries/html/injections.scm
index 18994f1a..742c92d9 100644
--- a/queries/html/injections.scm
+++ b/queries/html/injections.scm
@@ -1,5 +1,10 @@
((style_element
(raw_text) @css))
+((attribute
+ (attribute_name) @_attr
+ (quoted_attribute_value (attribute_value) @css))
+ (#match? @_attr "^style$"))
+
((script_element
(raw_text) @javascript))