Skip to content

Unable to use with Rails helpers #212

@codepilotsf

Description

@codepilotsf

I'm trying to get Headwind working with Rails helpers which look like this:
<%= some_helper, class: "text-blue-500 font-bold" %>

I've read the docs and tried adding this to my settings.json:

"headwind.classRegex": {
    "erb": "\\bclass\\s*:\\s*[\\\"\\']([\\._a-zA-Z0-9\\s\\-\\:\\/]+)[\\\"\\']",
    "html": "\\bclass\\s*:\\s*[\\\"\\']([\\._a-zA-Z0-9\\s\\-\\:\\/]+)[\\\"\\']",
  },

...but nothing seems to work. Not entirely sure this is a bug but perhaps it reveals a documentation shortcoming? Any tips would be greatly appreciated. Note that Headwind works great with regular HTML tags <p class="...">.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions