Change CLASS_NAME_PATTERN to work also for haml templates #38
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR changes the CLASS_NAME_PATTERN to work for haml templates.
Since haml syntax uses dots to chain class names, I first removed the dot from the search pattern...
But, to make sure it still works for decimal spacing classes (e.g.
my-1.5
), I added a pattern to allow dots which are preceded by a number between 0-3 and followed by a 5.By looking through the tailwind documentation, I think all the different class patterns are covered by a test already, so I'm not sure how to improve the test coverage... I'm happy to add more tests, but would need some input first, on what to test for...