Skip to content

Don't move partial classes inside Twig attributes#184

Merged
thecrypticace merged 4 commits intomainfrom
fix/twig-concat
Jul 14, 2023
Merged

Don't move partial classes inside Twig attributes#184
thecrypticace merged 4 commits intomainfrom
fix/twig-concat

Conversation

@thecrypticace
Copy link
Copy Markdown
Contributor

This is the same as #164 but for Twig / Melody.

Given:

<div class="sm:p-4 p-2 text-{{ i }}"></div>

Before PR (incorrect):

<div class="text- p-2 sm:p-4{{ i }}"></div>

After PR (correct):

<div class="p-2 sm:p-4 text-{{ i }}"></div>

Fixes #183

@thecrypticace thecrypticace changed the title Fix sorting of concat expressions in Twig attributes Don't move partial classes inside Twig attributes Jul 14, 2023
@thecrypticace thecrypticace merged commit a13d661 into main Jul 14, 2023
@thecrypticace thecrypticace deleted the fix/twig-concat branch July 14, 2023 14:17
bronisMateusz pushed a commit to bronisMateusz/prettier-plugin-tailwindcss-drupal that referenced this pull request Apr 16, 2025
* Simplify test

* Fix CS

* Fix concat expressions in Twig 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.

The plugin breaks partial classes like text-{{ i }} in Twig files

1 participant