rails / tailwindcss-rails

MIT License
1.42k stars 174 forks source link

Can the class name pattern regex be adjusted to allow for HAML templates? #31

Closed wnm closed 3 years ago

wnm commented 3 years ago

Hi there 👋

I was wondering what the reason is for having a dot in the regex to search for class names? Are there tailwind class names that include a dot?

The reason I'm asking is, because this way HAML templates don't work: https://regex101.com/r/hiAKC7/2

Without dots, it finds all class names for both html and haml templates: https://regex101.com/r/0JJDKQ/1

Except I'm missing something?

dhh commented 3 years ago

If you can do a PR with enough tests to verify that everything else is still working, then have at it!

jumph4x commented 3 years ago

Ooooh, this is cool. I'll try to take a stab at it in a little bit.

wnm commented 3 years ago

I've opened a PR here: #38