Skip to content
New issue

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

WIP: add Svelte support (.svelte) #198

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

chadsr
Copy link

@chadsr chadsr commented Aug 23, 2024

Adds support for mixed comment support (JS/HTML syntax) found in .svelte files

@chadsr
Copy link
Author

chadsr commented Aug 23, 2024

It seems adding mixed support of JS and HTML style comments is not straightforward with the current action.

Svelte's ace_mode property in https://raw.githubusercontent.com/github/linguist/master/lib/linguist/languages.yml returns html (codemirror_mode is htmlmixed)

Am I correct in assuming that mixed comments of this sort are currently not possible due to the usage of ace_mode making only HTML style comments recognisable?

@alstr
Copy link
Owner

alstr commented Aug 27, 2024

Yes, that would be a challenge to overcome at this stage unfortunately. I imagine the action could check codemirror_mode and then do something different if that is htmlmixed; it would just add some extra layers of complexity. Open to ideas though.

@chadsr chadsr changed the title add Svelte support (.svelte) WIP: add Svelte support (.svelte) Aug 27, 2024
@alstr alstr marked this pull request as draft September 24, 2024 17:31
@alstr
Copy link
Owner

alstr commented Oct 11, 2024

Thinking about it, you could try adding the comment syntax for HTML and JS under the one language definition. I think that might work, but I've not tried it myself.

The ace_mode doesn't really have a major impact beyond syntax highlighting, so it shouldn't affect the actual parsing of TODOs.

(This is based on memory and I may be completely wrong 😆).

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

Successfully merging this pull request may close these issues.

2 participants