feat(svelte): add javascript injection (#6540)

This commit is contained in:
Lucas Lopes 2024-04-30 12:10:19 -03:00 committed by GitHub
parent 121d0c4c67
commit 1a4274c9e1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -25,6 +25,17 @@
(#any-of? @_lang "ts" "typescript")
(#set! injection.language "typescript"))
((script_element
(start_tag
(attribute
(attribute_name) @_attr
(quoted_attribute_value
(attribute_value) @_lang)))
(raw_text) @injection.content)
(#eq? @_attr "lang")
(#any-of? @_lang "js" "javascript")
(#set! injection.language "javascript"))
((element
(start_tag
(attribute