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 2
2
' svelte ' : patch
3
3
---
4
4
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 {
54
54
do match_lang = regex_lang_attribute . exec ( template ) ;
55
55
while ( match_lang && match_lang [ 0 ] [ 1 ] !== 's' ) ; // ensure it starts with '<s' to match script tags
56
56
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
58
58
59
59
this . ts = match_lang ?. [ 2 ] === 'ts' ;
60
60
You can’t perform that action at this time.
0 commit comments