You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given that it's somewhat of an edge case and that this syntax is going to be less used with Svelte 5+, I'm putting this in the "not that important" category. I also suspect this might have to do with the JS grammar, AFAIK we just reuse it here.
GitHub linguist is using a fork of a fork from an ancient version of svelte-atom. They switched to the latest Svelte atom a while ago but are having some trouble with some injections. They eventually reverted it because they couldn't fix the sunsetted internal highlighting tool they used.
Even if they're using the grammar we're using now, and the embed problem doesn't exist. I don't think it would solve the problem. What I suspect is that they are using some old version of Atom javascript when it comes to HTML-like Textmate grammar, which doesn't support optional chaining.
TL:DR;
Since the syntax highlighting works fine on VS Code, I was assuming that it was a GitHub linguist issue.
However, there was a feedback that it might be the grammar issue. Therefore, submitting this issue.
Reference github-linguist/linguist#6673
Describe the issue
Svelte's
$: if( ) { }
syntax seems to be broken on github.com.Currently,
lang="ts"
is required to correctly highlight this syntax.The text was updated successfully, but these errors were encountered: