summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Davis2024-03-02 07:47:24 +0000
committerGitHub2024-03-02 07:47:24 +0000
commitd769fadde085169c26a850966a6d5d8da7cc1c12 (patch)
treee86767e7fe82b5e378e0099581df4be13dfcfc3d
parentf04dafa2e23e30771db92fdf6f39fcd1f0f5d0d6 (diff)
Fix precedence of svelte typescript injection (#9777)
-rw-r--r--runtime/queries/svelte/injections.scm14
1 files changed, 7 insertions, 7 deletions
diff --git a/runtime/queries/svelte/injections.scm b/runtime/queries/svelte/injections.scm
index 65a6e0e4..52d430c3 100644
--- a/runtime/queries/svelte/injections.scm
+++ b/runtime/queries/svelte/injections.scm
@@ -19,13 +19,6 @@
(quoted_attribute_value (attribute_value) @css))
(#eq? @_attr "style"))
-((script_element
- (raw_text) @injection.content)
- (#set! injection.language "javascript"))
-
-((raw_text_expr) @injection.content
- (#set! injection.language "javascript"))
-
(
(script_element
(start_tag
@@ -36,5 +29,12 @@
(#set! injection.language "typescript")
)
+((script_element
+ (raw_text) @injection.content)
+ (#set! injection.language "javascript"))
+
+((raw_text_expr) @injection.content
+ (#set! injection.language "javascript"))
+
((comment) @injection.content
(#set! injection.language "comment"))