-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
deno fmt should keep line breaks for the html class attribute. #75
Comments
@UnknownPlatypus How do you think? Should we keep classes on the same line or add line breaks? Or, add an option to allow users to control this? |
@g-plane I feel like if we try to add line break we will never get it right because some users will want:
In my opinion, the best and most flexible way to handle this would be to follow adam wishlist he explained with many details here prettier/prettier#10918 (comment) We could have a flag to choose between current behavior (always put everything on one line) and the new behavior (format on one line if there are no pre-existing newlines, otherwise format on multiple lines) To me it's the best of both worlds |
That solution sounds great, at least better than simply choosing adding line breaks or not. |
I use tailwindcss and often end up sometimes with lots of classes in my either .svelte files or .html files.
To make them more readable and compact I structure them with linebreaks. However, currently deno fmt will rearrange them in one long line that needs horizontal scrolling in VScode to review.
expected:
actual (deno 2.0.4 (stable, release, x86_64-pc-windows-msvc)
Originally reported in denoland/deno#26690
The text was updated successfully, but these errors were encountered: