We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I cant get headwind to work in Solidjs tsx component that is using class instead of React using className
class
className
i tried but not working :(
"headwind.classRegex": { "html": "\\bclass\\s*=\\s*[\\\"\\']([_a-zA-Z0-9\\s\\-\\:\\/]+)[\\\"\\']", "javascriptsolid": "(?:\\class\\s*=\\s*[\\\"\\']([_a-zA-Z0-9\\s\\-\\:\\/]+)[\\\"\\'])|(?:\\btw\\s*`([_a-zA-Z0-9\\s\\-\\:\\/]*)`)" },
The text was updated successfully, but these errors were encountered:
I know this is technically a necropost, but I feel like others will come across this in the future and want a solution.
"javascriptsolid" isn't a file type recognised by VSCode. All JSX and TSX files match to "javascriptreact" and "typescriptreact" respectively.
"javascriptsolid"
"javascriptreact"
"typescriptreact"
With that in mind, the following regex can be used that maintains support for both className and class:
// settings.json { /* Other settings... */ "headwind.classRegex": { "javascriptreact": "(?:\\b(?:className|class)\\s*=\\s*[\\\"\\']([_a-zA-Z0-9\\s\\-\\:\\/]+)[\\\"\\'])|(?:\\btw\\s*`([_a-zA-Z0-9\\s\\-\\:\\/]*)`)", "typescriptreact": "(?:\\b(?:className|class)\\s*=\\s*[\\\"\\']([_a-zA-Z0-9\\s\\-\\:\\/]+)[\\\"\\'])|(?:\\btw\\s*`([_a-zA-Z0-9\\s\\-\\:\\/]*)`)" } }
The regexes replace className with the non-capturing group (?:className|class).
(?:className|class)
P.S. You may need to restart VSCode after updating settings.json.
settings.json
Hope this helps 👍
Sorry, something went wrong.
No branches or pull requests
I cant get headwind to work in Solidjs tsx component that is using
class
instead of React usingclassName
i tried but not working :(
The text was updated successfully, but these errors were encountered: