todo-to-issue-action icon indicating copy to clipboard operation
todo-to-issue-action copied to clipboard

WIP: add Svelte support (.svelte)

Open chadsr opened this issue 1 year ago • 3 comments

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

chadsr avatar Aug 23 '24 11:08 chadsr

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?

chadsr avatar Aug 23 '24 13:08 chadsr

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.

alstr avatar Aug 27 '24 12:08 alstr

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 😆).

alstr avatar Oct 11 '24 12:10 alstr

Feel free to resubmit if you're able to revisit this.

alstr avatar Jan 22 '25 16:01 alstr