File tree Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ function hasScriptTag(content: string): boolean {
127
127
// They use this regex to find matching script tags that are passed to the `script` preprocessor hook:
128
128
// https://github.com/sveltejs/svelte/blob/bb83eddfc623437528f24e9fe210885b446e72fa/src/compiler/preprocess/index.ts#L144
129
129
// However, we remove the first part of the regex to not match HTML comments
130
- const scriptTagRegex = / < s c r i p t ( \s [ ^ ] * ?) ? (?: > ( [ ^ ] * ?) < \/ s c r i p t > | \/ > ) / gi;
130
+ const scriptTagRegex = / < s c r i p t ( \s [ ^ ] * ?) ? (?: > ( [ ^ ] * ?) < \/ s c r i p t \s * > | \/ > ) / gi;
131
131
132
132
// Regex testing is not a super safe way of checking for the presence of a <script> tag in the Svelte
133
133
// component file but I think we can use it as a start.
You can’t perform that action at this time.
0 commit comments