Closed praveenperera closed 4 years ago
This should be relatively easy to implement. Do you have any other examples of the class tag varying between languages/frameworks?
The one that comes to mind is Elm:
https://package.elm-lang.org/packages/elm/html/latest/Html-Attributes#class
But I can make the change for it to work with JSX for now.
Would this fix work with .tsx files in typescript?
If it's a simple regex change then it should work globally (so long as the extension can find a class value of some kind)
Would it be a possibility to have this regex available as a setting? This way it remains flexible, regardless of the syntax.
If it's an option I would like to give it a shot to create a PR.
Go for gold!
Is your feature request related to a problem? Please describe. This won't work inside JSX files
Describe the solution you'd like We could edit the regex to include jsx
className=....
https://github.com/heybourn/headwind/blob/master/src/extension.ts#L8Alternatives Check how vscode-tailwindcss works and use a similar approach of only running on certain file types? Maybe make it possible to work with other languages like Elm?