You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a <style> tag is appended to an element, it basically stays the same position after formatting. If the element is <html>, however, the <style> tag will go inside the <html>.
For example,
------
<div>
</div>
<style>
</style>
will be formatted to
------
<div></div>
<style></style>
but
------
<html>
</html>
<style>
</style>
will be formatted to
------
<html>
<style></style>
</html>
It could be that <html> element is handled differently as it represents the root of a document, but I haven't looked into the codebase yet, so I'm not sure.
Steps to Reproduce
The following packages are required for reproduction.
npm install prettier prettier-plugin-astro
Then, running the following code will show you the (seemingly) inconsistent result.
Describe the Bug
When a
<style>
tag is appended to an element, it basically stays the same position after formatting. If the element is<html>
, however, the<style>
tag will go inside the<html>
.For example,
will be formatted to
but
will be formatted to
It could be that
<html>
element is handled differently as it represents the root of a document, but I haven't looked into the codebase yet, so I'm not sure.Steps to Reproduce
The following packages are required for reproduction.
npm install prettier prettier-plugin-astro
Then, running the following code will show you the (seemingly) inconsistent result.
The text was updated successfully, but these errors were encountered: