-
Notifications
You must be signed in to change notification settings - Fork 141
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
[v0.1.9] Unwanted removal of leading whitespace for concatenated class #71
Comments
For me it wants to replace this function Test() {
- :class="['button', ...(buttonClass ? [buttonClass] : [])].join(' ')"
+ :class="['button', ...(buttonClass ? [buttonClass] : [])].join('')"
} ... which is certainly not what I want 😅 |
Thanks for reporting this @bennettdams! For now we have published a new release ( |
I like the feature of eliminating repeated spaces as well as the same class names. The problem of long class names can be used Before:
After:
|
@bradlc @adamwathan Any new plans for reintroducing this great feature? Maybe as a (default-off) option for the plugin as has been suggested by the community? We've had a number of new duplicate whitespace commits creep into our codebase, hard to manually review these mistakes. |
This vscode plugin may be useful for anyone wanting to do so: https://github.com/heybourn/headwind |
What version of
prettier-plugin-tailwindcss
are you using?v0.1.9
What version of Tailwind CSS are you using?
v3.0.24
What version of Node.js are you using?
v16.13.0
What package manager are you using?
npm
What operating system are you using?
Windows
Reproduction URL
https://github.com/bennettdams/tailwind-prettier-whitespace-bug
Describe your issue
Version
v0.1.9
introduced a change for frameworks like React that will introduce "bugs".Here is a basic example. When a class consists of multiple concatenated strings, the plugin now removes the leading whitespace:
I use this format of concatenated strings for visibility when there are a lot of classes, e.g.:
The text was updated successfully, but these errors were encountered: