Above, the Layout component (an Astro component) has another Astro component (AstroComponent) in the head and a script located outside the <html>
I suppose this is invalid html to have script tags located outside the html element however given "Template Syntax" documentation it's expected to be a valid Astro component
Formatting this document will move the script tag inside the html element
If there is no Astro component located in the head then the script and/or style tags located outside the html tag are not moved inside the html tag when formatting, and thus the result is expected
Full Layout component provided in steps to reproduce
Where should we place script tags in Layout components? Will astro still process these?
Steps to Reproduce
pnpm create astro@latest
select "Use blog template" when bootstrapping
cd [randomly-generated-project-name]
open apps/astro-app/src/layouts/main.astro and copy paste Layout component
Layout component
```Astro
---
import type { CollectionEntry } from "astro:content";
import BaseHead from "../components/BaseHead.astro";
import Header from "../components/Header.astro";
import Footer from "../components/Footer.astro";
import FormattedDate from "../components/FormattedDate.astro";
type Props = CollectionEntry<"blog">["data"];
const { title, description, pubDate, updatedDate, heroImage } = Astro.props;
---
Describe the Bug
Astro extension for VSCode configured with Prettier
Layout structure
Above, the Layout component (an Astro component) has another Astro component (AstroComponent) in the head and a script located outside the
<html>
I suppose this is invalid html to have script tags located outside the html element however given "Template Syntax" documentation it's expected to be a valid Astro component
Formatting this document will move the script tag inside the html element
If there is no Astro component located in the head then the script and/or style tags located outside the html tag are not moved inside the html tag when formatting, and thus the result is expected
Full Layout component provided in steps to reproduce
Where should we place script tags in Layout components? Will astro still process these?
Steps to Reproduce
pnpm create astro@latest
apps/astro-app/src/layouts/main.astro
and copy paste Layout componentLayout component
```Astro --- import type { CollectionEntry } from "astro:content"; import BaseHead from "../components/BaseHead.astro"; import Header from "../components/Header.astro"; import Footer from "../components/Footer.astro"; import FormattedDate from "../components/FormattedDate.astro"; type Props = CollectionEntry<"blog">["data"]; const { title, description, pubDate, updatedDate, heroImage } = Astro.props; ---{title}