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

Add svelte compatibility #387

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mathieuarthur
Copy link

@mathieuarthur mathieuarthur commented Apr 5, 2022

I checked that you seems to accept all languages but your extensions not working with svelte we need to change manually the parser.js from the /out folder like this : https://gist.github.com/armchair-traveller/d2eb2f4b65c8f97ebe1b2abaa2283142

I checked that you seems to accept all languages but your extensions not working with svelte we need to add to change manually the parser.js frome the /out folder like this : https://gist.github.com/armchair-traveller/d2eb2f4b65c8f97ebe1b2abaa2283142
@aaron-bond
Copy link
Owner

The all languages version is pending release (3.0.0) but hasn't been published yet. I'm looking at svelte support at the minute, but the issue I have is that there might be many comment formats within the one file. Do you know what changes specifically from that parser you linked are useful here? Also, which comment formats are you looking for here? JS / HTML / CSS / etc. ?

@mathieuarthur
Copy link
Author

we are looking for the three type of comment in the same file, JS, HTML and CSS

The link i gived to you is used as replacement as your parser.js and is a good workaround since it work for me.

And tbh idk what is usefull in this file since i didn't develop it, I just know that it's working.

But just looking a bit I would say that it's this :

case "svelte":
        this.setCommentFormat("<!--|//|/* ", "<!--|/*", "-->|*/");
        this.highlightJSDoc = true;

but this workaround have still a bug, we still can't use bettercomments with this comment format : "//"

It only work for multilines in js. Work for any other type of comments for html and css

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.

None yet

2 participants