From d769fadde085169c26a850966a6d5d8da7cc1c12 Mon Sep 17 00:00:00 2001 From: Michael Davis Date: Sat, 2 Mar 2024 02:47:24 -0500 Subject: Fix precedence of svelte typescript injection (#9777) --- runtime/queries/svelte/injections.scm | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'runtime') 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")) -- cgit v1.2.3-70-g09d2