WalrusSoup / Tailwind-Formatter

Port of Headwind to Intellij. Opinionated class formatter for TailwindCSS
111 stars 9 forks source link

Support formatting @apply statements #14

Closed vntw closed 4 years ago

vntw commented 4 years ago

Fixes #10

This PR allows to format classes in @apply statements.

It improves the handling of extra spaces and cleans them up. It also ignores classes on multiple lines, previously these would be "wrongly" formatted (but not actually sorted) - these are now ignored.

I would've liked to simplify the regex but unfortunately Java doesn't support branch reset groups or multiple named capture groups.

As for the code, I'll direct you to the disclaimer in #13 🙂 I tried to find out more about data providers in JUnit but settled with the current solution since it seemed simple enough for this use case

If this is likely to be merged I'll update the readme and changelog

tance77 commented 4 years ago

This is a really cool feature and so is #13. Going to be reviewing these today.

WalrusSoup commented 4 years ago

The git merge available to resolve issues on this branch did not merge these correct. Rolling back