Skip to content

Commit

Permalink
Update HTML highlights (helix-editor#11400)
Browse files Browse the repository at this point in the history
* Update HTML highlights

* Update after review comments
  • Loading branch information
David-Else authored Aug 9, 2024
1 parent f522519 commit 931ddbb
Showing 1 changed file with 31 additions and 5 deletions.
36 changes: 31 additions & 5 deletions runtime/queries/html/highlights.scm
Original file line number Diff line number Diff line change
@@ -1,13 +1,39 @@
(tag_name) @tag
(erroneous_end_tag_name) @tag.error
(erroneous_end_tag_name) @error
(doctype) @constant
(attribute_name) @attribute
(comment) @comment

[
"\""
(attribute_value)
] @string
((attribute
(attribute_name) @_attr
(quoted_attribute_value (attribute_value) @markup.link.url))
(#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"))

[
"<"
Expand Down

0 comments on commit 931ddbb

Please sign in to comment.