;; Forked from https://github.com/nvim-treesitter/nvim-treesitter/blob/master/queries/html_tags/injections.scm
;; Licensed under the Apache License 2.0
;
;
; Add "lang" to predicate check so that vue/svelte can inherit this
; without having this element being captured twice
(
(style_element
(start_tag) @_no_type_lang
(#not-lua-match? @_no_type_lang "%slang%s*=")
(#not-lua-match? @_no_type_lang "%stype%s*=")
(raw_text) @css
)
)
(
(style_element
(start_tag
(attribute
(attribute_name) @_type
(quoted_attribute_value
(attribute_value) @_css
)
)
)
(raw_text) @css
)
(#eq? @_type "type")
(#eq? @_css "text/css")
)
;
;
(
(script_element
(start_tag) @_no_type_lang
(#not-lua-match? @_no_type_lang "%slang%s*=")
(#not-lua-match? @_no_type_lang "%stype%s*=")
(raw_text) @javascript
)
)
;