diff --git a/.changeset/chilly-carrots-think.md b/.changeset/chilly-carrots-think.md new file mode 100644 index 000000000..a90ab8715 --- /dev/null +++ b/.changeset/chilly-carrots-think.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +preventing multiple doctype injection into html documents diff --git a/packages/astro/src/runtime/server/render/page.ts b/packages/astro/src/runtime/server/render/page.ts index 7562c8563..70445ee41 100644 --- a/packages/astro/src/runtime/server/render/page.ts +++ b/packages/astro/src/runtime/server/render/page.ts @@ -30,6 +30,7 @@ async function iterableToHTMLBytes( for await (const chunk of iterable) { if (isHTMLString(chunk)) { if (i === 0) { + i++; if (!/\n', result); if (onDocTypeInjection) {