Skip to content

Conversation

@UfukUstali
Copy link
Contributor

@UfukUstali UfukUstali commented Nov 8, 2023

Previously in the for loop for dynamicAttrs "attr.name" was added in the string template (which was undefined) while the required value was "attr" itself.
e.g. tailwindAttributes: ["ui"],

Before:
staticAttrs: "class,ui"
dynamicAttrs: ":class,v-bind:class,:undefined,v-bind:undefined"

After:
staticAttrs: "class,ui"
dynamicAttrs: ":class,v-bind:class,:ui,v-bind:ui"

fixes Prettier Plugin Tailwind within :ui={...} and [Prettier Plugin] Can't seem to get "tailwindAttributes" and/or "tailwindFunctions" to work?

UfukUstali and others added 2 commits November 8, 2023 14:38
Previously in the for loop for dynamicAttrs "attr.name" was added in the string template (which was undefined) while the required value was "attr" itself.
e.g. tailwindAttributes: ["ui"],
Before:
staticAttrs: "class,ui"
dynamicAttrs: ":class,v-bind:class,:undefined,v-bind:undefined"
After:
staticAttrs: "class,ui"
dynamicAttrs: ":class,v-bind:class,:ui,v-bind:ui"
@thecrypticace thecrypticace merged commit 15c1196 into tailwindlabs:main Nov 8, 2023
@thecrypticace thecrypticace changed the title Fix dynamicAttrs options.js Correctly populate dynamicAttrs for custom attributes Nov 8, 2023
@UfukUstali UfukUstali deleted the patch-1 branch November 8, 2023 16:01
@thecrypticace thecrypticace changed the title Correctly populate dynamicAttrs for custom attributes Fix sorting inside dynamic custom attributes Nov 8, 2023
@thecrypticace
Copy link
Contributor

lol oops — thanks

@thecrypticace
Copy link
Contributor

Released as v0.5.7 — may take a few for NPM to pick it up

bronisMateusz pushed a commit to bronisMateusz/prettier-plugin-tailwindcss-drupal that referenced this pull request Apr 16, 2025
…#225)

* Fix `dynamicAttrs` in `options.js`

* Add test

---------

Co-authored-by: Jordan Pittman <[email protected]>
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

Successfully merging this pull request may close these issues.

Prettier Plugin Tailwind within :ui={...}

2 participants