Closed cyberquito closed 2 years ago
I'm on Windows, this started happening after the update as well. Looks like HTML that contains JS is not highlighting correctly:
To fix this fix the embeds for:
as https://github.com/sublimehq/Packages has changed recently.
@cyberquito @teaguehannam @jrappen Thanks for reporting, I also just updated to Sublime Text 4 and discovered this issue. I've been busy with my full-time job the last couple of months and have fallen behind on my personal work. Will get this fixed ASAP.
Thanks so much for looking into this @corneliusio! I believe this references the same issue.
@corneliusio I just opened a PR (#18) with a fix. Feel free to use it or modify it if you have a better fix in mind!
Sorry to pile on, just wanted to confirm I see the same issue with the same cause, after the first closing }
the highlighting breaks. Caused by the recent Sublime Text update. What a bummer, @corneliusio sorry the Sublime Team broke your package :(
@burlesona Ha, is what is, nature of a package/plugin based ecosystem.
Noting here, I've started working on some fixes that are in the https://github.com/corneliusio/svelte-sublime/tree/v4 branch. There are still some issues, but it's far less broken than the current release. Feel free to manually install while I finish up some of the smaller fixes.
The root cause for this issue is JavaScript supporting shebang now, which causes the main context to be pushed away from.
Hence you need to change the following line
to:
embed-scope:
- meta_scope: meta.embedded.block.svelte
- meta_content_scope: source.js.svelte
- match: \}
scope: punctuation.section.embedded.end.svelte
pop: true
- include: Packages/JavaScript/JavaScript.sublime-syntax#script # <- directly include scripts.
Thanks @deathaxe, that is certainly much simpler than my fix. Didn’t know about that change.
Heyo, thanks @deathaxe for zeroing in on that! That adjustment seems to have fixed everything I can find. I'll be tagging a release for this fix but if anyone wants to snag the updated syntax definitions waiting for the release to propagate, it's in https://github.com/corneliusio/svelte-sublime/tree/v4.
Closing this out now as the fix should be available to everyone soon via Package Control update.
Hello,
I just upgrade sublime text to version 4121. The highlighting on html is not working properly anymore. The error starts on the first closing bracket. From there on, every tag is off. The script section works fine.
I'm on a Linux Ubuntu 21.04.