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

Fix sorting inside dynamic custom attributes #225

Merged
merged 2 commits into from Nov 8, 2023
Merged

Fix sorting inside dynamic custom attributes #225

merged 2 commits into from Nov 8, 2023

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
1 check passed
@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

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