dillonkearns / elm-review-html-to-elm

Turn HTML into Elm. With support for elm-tailwind-modules.

Home Page:http://html-to-elm.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add configuration option for custom pattern for Tailwind color palette

dillonkearns opened this issue · comments

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

(Regex.fromString "(\\w+)\\W(\\w+\\W\\d{2,3}|black|current|inherit|transparent|white)" |> Maybe.withDefault Regex.never)

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.

See also discussion in #21