|
|
@ -8,13 +8,37 @@
|
|
|
|
(raw_text) @injection.content)
|
|
|
|
(raw_text) @injection.content)
|
|
|
|
(#set! injection.language "javascript"))
|
|
|
|
(#set! injection.language "javascript"))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; <script>
|
|
|
|
((script_element
|
|
|
|
((script_element
|
|
|
|
|
|
|
|
(start_tag) @_no_lang
|
|
|
|
(raw_text) @injection.content)
|
|
|
|
(raw_text) @injection.content)
|
|
|
|
|
|
|
|
(#not-match? @_no_lang "lang=")
|
|
|
|
(#set! injection.language "javascript"))
|
|
|
|
(#set! injection.language "javascript"))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; <script lang="...">
|
|
|
|
|
|
|
|
((script_element
|
|
|
|
|
|
|
|
(start_tag
|
|
|
|
|
|
|
|
(attribute
|
|
|
|
|
|
|
|
(attribute_name) @_attr_name
|
|
|
|
|
|
|
|
(quoted_attribute_value (attribute_value) @injection.language)))
|
|
|
|
|
|
|
|
(raw_text) @injection.content)
|
|
|
|
|
|
|
|
(#eq? @_attr_name "lang"))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; <style>
|
|
|
|
((style_element
|
|
|
|
((style_element
|
|
|
|
|
|
|
|
(start_tag) @_no_lang
|
|
|
|
(raw_text) @injection.content)
|
|
|
|
(raw_text) @injection.content)
|
|
|
|
|
|
|
|
(#not-match? @_no_lang "lang=")
|
|
|
|
(#set! injection.language "css"))
|
|
|
|
(#set! injection.language "css"))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; <style lang="...">
|
|
|
|
|
|
|
|
((style_element
|
|
|
|
|
|
|
|
(start_tag
|
|
|
|
|
|
|
|
(attribute
|
|
|
|
|
|
|
|
(attribute_name) @_attr_name
|
|
|
|
|
|
|
|
(quoted_attribute_value (attribute_value) @injection.language)))
|
|
|
|
|
|
|
|
(raw_text) @injection.content)
|
|
|
|
|
|
|
|
(#eq? @_attr_name "lang"))
|
|
|
|
|
|
|
|
|
|
|
|
((comment) @injection.content
|
|
|
|
((comment) @injection.content
|
|
|
|
(#set! injection.language "comment"))
|
|
|
|
(#set! injection.language "comment"))
|
|
|
|