Skip to content

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

@alessandro-newzoo

Description

@alessandro-newzoo

What version of prettier-plugin-tailwindcss are you using?

0.4.0

What version of Tailwind CSS are you using?

3.3.3

What version of Node.js are you using?

20.4.0

What package manager are you using?

npm

What operating system are you using?

Linux codespaces-4330ea 5.15.0-1041-azure #48-Ubuntu SMP

Reproduction

<div class="flex text-{{ i }}">
    xxx
</div>

will become:

<div class="text- flex{{ i }}">
    xxx
</div>

.prettierrc.js:

module.exports = {

	plugins: [
		'./node_modules/prettier-plugin-twig-melody',
		require('prettier-plugin-tailwindcss')
	],
}

Describe your issue

Hello!
First of all thank you so much for all your work on this fantastic plugin 🙏🏻

I was excited to see this issue I've been having was finally fixed in #164 , though it's not working for me, with .twig files.
I'm not sure if it's because the fix is specific to Liquid files, or because I'm setting something wrong up, but either way I thought I'd report it and kindly ask if it's possible to make this work with Twig files too?

Happy Friday!
Alessandro

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions