headwind
headwind copied to clipboard
Support for Svelte files
Please add support for .svelte files or enable svelte files to be handled as html files.
Thanks
You're probably able to solve this by adding a classRegex option to the settings. I did this for .njk files and just inserted the same regex as is used for html files:
"headwind.classRegex": {
"njk": "\\bclass\\s*=\\s*[\\\"\\']([_a-zA-Z0-9\\s\\-\\:\\/]+)[\\\"\\']"
}
You're probably able to solve this by adding a classRegex option to the settings. I did this for .njk files and just inserted the same regex as is used for html files:
"headwind.classRegex": { "njk": "\\bclass\\s*=\\s*[\\\"\\']([_a-zA-Z0-9\\s\\-\\:\\/]+)[\\\"\\']" }
Tried this, unfortunately doesn't appear to work with Svelte.
Settings.json:
"headwind.classRegex": {
"svelte": "\\bclass\\s*=\\s*[\\\"\\']([_a-zA-Z0-9\\s\\-\\:\\/]+)[\\\"\\']"
}
@jmroon Strange! I just tested it and it worked in my editor. I used a slightly different RegEx, not sure why, but does it work on your machine with this one:
"svelte": "\\bclass\\s*=\\s*[\\\"\\']([_a-zA-Z0-9\\s\\-\\:\\/\\[\\]]+)[\\\"\\']"