Skip to content

Commit 06f31c2

Browse files
committed
fix: improve script matcher regexp #34
1 parent 80242d7 commit 06f31c2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/manager/webview.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ function getCSS() {
2828
}
2929

3030
export function fixSha256(html: string) {
31-
const [,scriptString] = html.match(/<script async type="module">([\s\S]*?)<\/script>/) || []
31+
const [, scriptString] = html.match(/<script async=?"{0,2} type="module">([\s\S]*?)<\/script>/) || []
3232
if (!scriptString) {
3333
return html
3434
}

0 commit comments

Comments
 (0)