Update HTML highlights (#11400)

* Update HTML highlights

* Update after review comments
This commit is contained in:
David Else 2024-08-09 16:26:19 +01:00 committed by GitHub
parent f52251960a
commit 931ddbb077
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,13 +1,39 @@
(tag_name) @tag (tag_name) @tag
(erroneous_end_tag_name) @tag.error (erroneous_end_tag_name) @error
(doctype) @constant (doctype) @constant
(attribute_name) @attribute (attribute_name) @attribute
(comment) @comment (comment) @comment
[ ((attribute
"\"" (attribute_name) @_attr
(attribute_value) (quoted_attribute_value (attribute_value) @markup.link.url))
] @string (#any-of? @_attr "href" "src"))
((element
(start_tag
(tag_name) @_tag)
(text) @markup.link.label)
(#eq? @_tag "a"))
(attribute [(attribute_value) (quoted_attribute_value)] @string)
((element
(start_tag
(tag_name) @_tag)
(text) @markup.bold)
(#any-of? @_tag "strong" "b"))
((element
(start_tag
(tag_name) @_tag)
(text) @markup.italic)
(#any-of? @_tag "em" "i"))
((element
(start_tag
(tag_name) @_tag)
(text) @markup.strikethrough)
(#any-of? @_tag "s" "del"))
[ [
"<" "<"