File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
packages/svelte/src/compiler/phases/1-parse Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change 22' svelte ' : patch
33---
44
5- fix: improve script ` lang ` attribute matching
5+ fix: improve script ` lang ` attribute detection
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ export class Parser {
5454 do match_lang = regex_lang_attribute . exec ( template ) ;
5555 while ( match_lang && match_lang [ 0 ] [ 1 ] !== 's' ) ; // ensure it starts with '<s' to match script tags
5656
57- regex_lang_attribute . lastIndex = 0 ; // need to reset index to pass tests — otherwise do not use global regex
57+ regex_lang_attribute . lastIndex = 0 ; // reset matched index to pass tests - otherwise declare the regex inside the constructor
5858
5959 this . ts = match_lang ?. [ 2 ] === 'ts' ;
6060
You can’t perform that action at this time.
0 commit comments