Skip to content
This repository has been archived by the owner on Apr 6, 2021. It is now read-only.

Support Svelte 'class:' syntax #183

Merged
merged 1 commit into from
Mar 31, 2021
Merged

Support Svelte 'class:' syntax #183

merged 1 commit into from
Mar 31, 2021

Conversation

adamwathan
Copy link
Member

@adamwathan adamwathan commented Mar 29, 2021

Resolves #71

This PR is an alternative to #178 that is a bit simpler, and just adds a little bit of Svelte-specific awareness to our internals to strip off any leading class: only when reading a .svelte file. There is a tiny performance cost to this, which is why I've opted to do it only on .svelte files and not on all files.

I believe some older Svelte projects might use .html as the file extension for Svelte stuff — personally I am totally comfortable telling those people to change the file extension if they need this feature or to override the default extractor.

@mrwokkel
Copy link

mrwokkel commented Apr 1, 2021

Could the .svx extension be added too? It is the .mdx of svelte.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Svelte's conditional class syntax is not picked up correctly
2 participants