From 666b7e311fa82109a8c507ff52b35854715c6b8d Mon Sep 17 00:00:00 2001 From: Anon Ymous <73802848+ancientstraits@users.noreply.github.com> Date: Thu, 13 Mar 2025 14:50:01 -0400 Subject: [PATCH] Update index.js --- packages/svelte/src/compiler/phases/1-parse/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/svelte/src/compiler/phases/1-parse/index.js b/packages/svelte/src/compiler/phases/1-parse/index.js index 6cc5b58aa666..f49e518d02b0 100644 --- a/packages/svelte/src/compiler/phases/1-parse/index.js +++ b/packages/svelte/src/compiler/phases/1-parse/index.js @@ -75,7 +75,7 @@ export class Parser { regex_lang_attribute.lastIndex = 0; // reset matched index to pass tests - otherwise declare the regex inside the constructor - this.ts = match_lang?.[2] === 'ts'; + this.ts = (match_lang?.[2] === 'ts') || (match_lang?.[2] === 'ts (typescript)'); this.root = { css: null,