heybourn / headwind

An opinionated Tailwind CSS class sorter built for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=heybourn.headwind
MIT License
1.38k stars 46 forks source link

Half margins and paddings broke auto sort #128

Closed laurensiusadi closed 3 years ago

laurensiusadi commented 3 years ago

Auto sort doesn't work for half margins and paddings: m-0.5 p-1.5 mt-2.5 pb-3.5 etc. All margins class and padding with .5 If I remove the .5 it works as intended. I'm using 2.0.0, also happen on previous versions.

praveenperera commented 3 years ago

Can you try to use this custom regex for HTML:

"/\\bclass\\s*=\\s*[\\\"\\']([\\._a-zA-Z0-9\\s\\-\\:\\/]+)[\\\"\\']/"
laurensiusadi commented 3 years ago

Sorry, according to docs I need to put the regex on package.json, assuming that belongs to the extension, where can I find it?

laurensiusadi commented 3 years ago

Just had time to check this again, I found the place to put it, in Extension settings json file. On CSS file it works, not sure with HTML, because event with .5 deleted somehow it doesn't work at all. I'm testing on Vue file.