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 {
127127 // They use this regex to find matching script tags that are passed to the `script` preprocessor hook:
128128 // https://github.com/sveltejs/svelte/blob/bb83eddfc623437528f24e9fe210885b446e72fa/src/compiler/preprocess/index.ts#L144
129129 // 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;
131131
132132 // Regex testing is not a super safe way of checking for the presence of a <script> tag in the Svelte
133133 // component file but I think we can use it as a start.
You can’t perform that action at this time.
0 commit comments