54nd10 / Tailwind-reorder

The Unlicense
9 stars 5 forks source link

Doesn't work on sublime 4 and tailwind 3 #3

Closed work-leonid closed 2 years ago

work-leonid commented 2 years ago

Hi! Thank you for this plugin. But in my case it isn't working properly.

This is what i get after applying plugin to my code

<div class="p-5 rounded-xl bg-opacity-20 bg-slate-700 text-center lg:p-10 md:p-8">
                    <svg xmlns="http://www.w3.org/2000/svg" class="mb-5" mx-auto text-fuchsia-400 h-10 w-10 0 24 24" fill="none" stroke="currentColor viewBox="0">
                        <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 3v4M3 5h4M6 17v4m-2-2h4m5-16l2.286 6.857L21 12l-5.714 2.143L13 21l-2.286-6.857L5 12l5.714-2.143L13 3z" />
                    </svg>
                    <h3 class="mb-3 font-bold ">Less noise from the news</h3>
                    <p class="opacity-60 ">Only 1 email with all new materials from your favourite websites</p>
                </div>

Original code

<div class="p-5 md:p-8 lg:p-10 rounded-xl bg-slate-700 bg-opacity-20 text-center">
                    <svg xmlns="http://www.w3.org/2000/svg" class="h-10 w-10 text-fuchsia-400 mx-auto mb-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
                        <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 3v4M3 5h4M6 17v4m-2-2h4m5-16l2.286 6.857L21 12l-5.714 2.143L13 21l-2.286-6.857L5 12l5.714-2.143L13 3z" />
                    </svg>
                    <h3 class="mb-3 font-bold">Less noise from the news</h3>
                    <p class="opacity-60">Only 1 email with all new materials from your favourite websites</p>
                </div>

What's wrong

Mac OS 12.1 (21C52) Sublime 4126 Tailwind 3.0

cwsuba commented 2 years ago

There is a mistake in the regex, that's why it's doing this. I have created a pull request to correct it. In the meantime you can use my forked version.