elm-review-html-to-elm icon indicating copy to clipboard operation
elm-review-html-to-elm copied to clipboard

Add configuration option for custom pattern for Tailwind color palette

Open dillonkearns opened this issue 1 year ago • 1 comments

There is currently a hardcoded Regex that matches the default Tailwind v3 color theme names:

https://github.com/dillonkearns/elm-review-html-to-elm/blob/e2ed0f06e5e571ae8bd7bff42cde6e89da3c2b34/src/TailwindClass.elm#L124

However, this will not catch colors from a custom Tailwind configuration if they don't follow the same pattern. One solution to support this would be to add an option in the configuration where the user can pass in a custom Regex string that will be used instead of the default when provided.

dillonkearns avatar Jul 05 '23 22:07 dillonkearns