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
{{ message }}
Repository navigation
📝 Prettier has special treatment of class, style attributes #5242
Note that our playground will not show the difference right now, that's because there is a bug with our playground. It currently doesn't match prettier's playground for this input.
I've actually figured out why our playground doesn't show the behavior. Our playground disables prettier's embeddedLanguageFormatting, and prettier considers the these attributes as embedded languages.
Activity
dyc3 commentedon Mar 2, 2025
Note that our playground will not show the difference right now, that's because there is a bug with our playground. It currently doesn't match prettier's playground for this input.
Prettier playground: https://prettier.io/playground/#N4Igxg9gdgLgprEAuEAeADgAgDpU5sAGwEMBnUgXmxF33wDMIJa6AjYgJxf3YC8XquAHy5UAenQioIADQgI6GAEtopZKE4cIAdwAKnBGpTFC24gE81c1h2JgA1nBgBlYgFs4AGSVQ4yeiakcHIQrABWcGAwAOq26Mgg6BxwQRwAbn7Wtg5Ozuh2PgDmyDAcAK7BIEFuSiXllXAAHuhwHEoesCYA8i22MBAcuhCkSsrQCQgAJrIgTb3tCDAmACqtUJxKKf6BlSNQhYRwAIplEPDbhEFyYaSNzkWHJ2d+SAGXlQCOp-C6WuhGIDIAFpfHBJmCZqViEpCEUAMIQNxuYgJEyEGZ7A5wACCMFKSlYZR+rW8vguVxAAAsYG5CNFKaMUvkwHBnIZRko0qNzAkwOQZmkKgBJKDg2DOMBtRTY0XOGDmQ7kypJYZwWLEeIoJIpVoZGY+VIwX7EQrIpVyfIcVIJam0mZJHwxJSTGCU5AADgADHJkl8lMljaaUa8dnIlqxos7XcgAExyMpBZbEVhGN4UuBuVhg8GTTzEfZlE1wABiA2ReKKqKJEBAAF9a0A
dyc3 commentedon Jun 10, 2025
I've actually figured out why our playground doesn't show the behavior. Our playground disables prettier's
embeddedLanguageFormatting, and prettier considers the these attributes as embedded languages.class attribute: https://github.com/prettier/prettier/blob/0fe055c25d7e8b74bab35c188ee9bb3de4c23fa5/src/language-html/embed/class-names.js
style attribute: https://github.com/prettier/prettier/blob/0fe055c25d7e8b74bab35c188ee9bb3de4c23fa5/src/language-html/embed/style.js
This makes more sense for the style attribute, where it actually invokes the CSS parser and formatter to format the text.
feat(github-issues): linked issues expand, collapse, and show type an…
feat(github-issues): linked issues expand, collapse, and show type an…
feat(github-issues): linked issues expand, collapse, and show type an…
feat(github-issues): linked issues expand, collapse, and show type an…
feat(github-issues): linked issues expand, collapse, and show type an…
feat(github-issues): linked issues expand, collapse, and show type an…
feat(github-issues): linked issues expand, collapse, and show type an…
feat(github-issues): linked issues expand, collapse, and show type an…