Skip to content
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

Whitepace still removed incorrectly for some ternary conditions #305

Open
karptonite opened this issue Jul 12, 2024 · 3 comments
Open

Whitepace still removed incorrectly for some ternary conditions #305

karptonite opened this issue Jul 12, 2024 · 3 comments
Assignees

Comments

@karptonite
Copy link

karptonite commented Jul 12, 2024

What version of prettier-plugin-tailwindcss are you using?
v0.6.5

What version of Tailwind CSS are you using?
v3.4.4

What version of Node.js are you using?
v18.20.4

What package manager are you using?
Yarn

What operating system are you using?
macOS

Describe your issue

 <ul [class]="'pagination' + (size ? ' pagination-' + size : '')">

in 0.5.3, this code is unchanged.
in 0.6.5, it is changed to

 <ul [class]="'pagination' + (size ? 'pagination-' + size : '')">

This was discussed previously in issue #285.
It seems like it was fixed in #288, but apparently not in this case.

@thecrypticace
Copy link
Contributor

what templating language is this? Angular?

@karptonite
Copy link
Author

Yes, this is Angular.

@thecrypticace thecrypticace self-assigned this Jul 15, 2024
@ziloen
Copy link

ziloen commented Aug 5, 2024

Same in template strings

// React
<div className={`text-black${condition ? ' bg-green': ''}`} />

becomes

<div className={`text-black${condition ? 'bg-green': ''}`} />

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants