-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐛 BUG: <style> is moved inside <body> where applicable #260
Comments
Hello, thank you for creating this issue! This is a known bug in our compiler at the moment withastro/compiler#318 Hoping to get that fixed soon 😅 I'll close this issue just so we don't get duplicated issues, but thank you again for creating it! |
Is there an issue tracking this for the prettier plugin, or do you consider the compiler issue to count as tracking this? |
Since ultimately it's exclusively a compiler issue, I consider the compiler issue to be tracking it |
🤷 ok I'd argue it's both a "prettier formats incorrectly" issue and then there's an implementation detail of that issue being tracked in the compiler repo as the root cause, so it's two issues since it's two projects that have the bug since otherwise there's no issue in this repo to close when the bug is fixed by updating the compiler dep thanks for explaining 🙏 |
That's fair, you've changed my mind! |
thanks for hearing me out :) |
#286 for another repro |
|
For that one, the relevant compiler issue is this one withastro/compiler#318 |
ack |
With the v0.6.0 update, <style>...</style> isn't moved inside 🎉 but unfortunately, in a layout with the following structure: <html>
<head>
</head>
<body>
</body>
</html>
<style>
</style> <html>
<head>
</head>
<body>
</body>
<style>
</style>
</html> |
I'm afraid that at least for me, this bug is back. Specifically this version of the bug, where style blocks are moved inside the closing I'm on astro 2.0.0-beta.2, prettier-plugin-astro 0.7.2 |
Yep, tracked here #316 Sorry for the inconvenience, we're currently in the midst of releasing Astro 2.0, so this could take some time to fix, but it's planned! |
Oops, should have checked current issues. Thanks! |
Describe the Bug
Apologies if this is not a bug, but:
In components/layouts with ..., component/layout styles written outside the main html are moved by the plugin to inside the ... structure.
example
Steps to Reproduce
I expect the following code to remain as is:
but instead, the prettier plugin changes it to:
The text was updated successfully, but these errors were encountered: