Skip to content

Don't move partial classes inside Liquid script attributes#164

Merged
thecrypticace merged 3 commits intomainfrom
fix/liquid-drop-inside-attrs
May 19, 2023
Merged

Don't move partial classes inside Liquid script attributes#164
thecrypticace merged 3 commits intomainfrom
fix/liquid-drop-inside-attrs

Conversation

@thecrypticace
Copy link
Copy Markdown
Contributor

Given the following:

<div class="sm:p-4 p-2 foo--{{ id }}"></div>

We would end up sorting it to the following (which is incorrect):

<div class="foo-- p-2 sm:p-4 {{ id }}"></div>

Now, matching the behavior of template literals in JS and expressions in Svelte we now sort it like this instead:

<div class="p-2 sm:p-4 foo--{{ id }}"></div>

Fixes #163

@thecrypticace thecrypticace merged commit 59d8f46 into main May 19, 2023
@thecrypticace thecrypticace deleted the fix/liquid-drop-inside-attrs branch May 19, 2023 14:51
bronisMateusz pushed a commit to bronisMateusz/prettier-plugin-tailwindcss-drupal that referenced this pull request Apr 16, 2025
…abs#164)

* Fix liquid sorting

* Fix Liquid mustache tags inside attributes

* Update changelog
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.

Compatibility with @shopify/prettier-plugin-liquid using tailwind prefix

1 participant