Tailwind-Formatter icon indicating copy to clipboard operation
Tailwind-Formatter copied to clipboard

Formatting in brackets

Open jannahalka opened this issue 1 year ago • 2 comments

Hello, I would like to ask a question. The formatting works perfectly when I don't have quotes surrounded by brackets but as soon as I surround them with brackets formatting no longer works.

className="flex text-xl ..." -> works className={"flex text-xl ..."} -> doesn't work

So my question is if the behavior is intentional or am I doing something wrong. Thanks

jannahalka avatar Nov 30 '22 00:11 jannahalka

This is for react, correct? Can you attach a few files so I can write some tests?

WalrusSoup avatar Jan 16 '23 20:01 WalrusSoup

Hey there, it would also come in handy for .twig files. Where you do stuff like

{{ svg('@webroot/dist/svg/icon.svg')|attr({class: 'text-red xl:w-4 h-4'}) }}

or not so pretty but sometimes needed ..

<div class="{{ module.alignment == 'left' ? 'md:ml-10 xl:ml-24 p-4' : 'md:mr-10 xl:mr-24 p-4' }}">...</div>

fsbtmo avatar May 09 '23 09:05 fsbtmo