Skip to content

Commit 650bc3e

Browse files
committed
better
1 parent 7cb71ac commit 650bc3e

File tree

1 file changed

+2
-2
lines changed
  • packages/svelte/src/compiler/phases/1-parse

1 file changed

+2
-2
lines changed

packages/svelte/src/compiler/phases/1-parse/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ export class Parser {
5353

5454
for(const match of lang_matches)
5555
{
56-
if(!match[0]?.startsWith('<!--'))
56+
if(match[0]?.[1] === 's') // ensure it starts with '<s' to match script tags
5757
{
58-
this.ts = match?.[2] === 'ts';
58+
this.ts = match[2] === 'ts';
5959
break;
6060
}
6161
}

0 commit comments

Comments
 (0)