Skip to content

Write HTML. Render video. Built for agents.

test(bundler): accept arbitrary content in script close tag

Jamesf3f542b42f48
diff --git a/packages/core/src/compiler/htmlBundler.test.ts b/packages/core/src/compiler/htmlBundler.test.ts
index 7675b307f8..c70f49037f 100644
--- a/packages/core/src/compiler/htmlBundler.test.ts
+++ b/packages/core/src/compiler/htmlBundler.test.ts
@@ -107,7 +107,7 @@ describe("bundleToSingleHtml", () => {
// the separator, parse would fail with an unexpected-token error somewhere
// around the chunk boundary.
const { transformSync } = await import("esbuild");
- const re = /<script\b[^>]*>([\s\S]*?)<\/script\s*>/gi;
+ const re = /<script\b[^>]*>([\s\S]*?)<\/script[^>]*>/gi;
let m: RegExpExecArray | null;
while ((m = re.exec(bundled)) !== null) {
const body = m[1];