-
Notifications
You must be signed in to change notification settings - Fork 57
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
Syntax highlighting broken in 1.19.6 #803
Comments
The problem here is that JS syntax highlighting encounters no end symbol like a newline or a But this can be easily fixed in the following ways:
%%raw("import './App.css'")
%%raw(`import './App.css';`)
%%raw(`
import './App.css'
`) TBH I did not really account for the single line syntax highlight when I implemented this feature, what should we do in that case? One workaround would be to just automatically format to one of the above suggestions, another one would be to only support JS syntax highlighting in multiline extension points (not sure if that is possible just with the tmlanguage grammar). cc @zth @cristianoc |
Is the embedded string responsible for terminating? I'd expect the editor to highlight the embedded text up until some termination of the embedded string itself (`) in this case) but maybe that's not how it works? |
My textmate knowledge is not good enough, but I imagine the embedded JS syntax finds no stop condition, and `) is very valid JS. Edit: |
Found a fix, I just added another single line pattern. |
I installed pre-release version 1.19.6 and found the end of the


%%raw()
cannot be identified correctly, now everything starting from%%raw(
share the same color:This does not happen in 1.18.0:
The text was updated successfully, but these errors were encountered: