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

Unable to highlight code in raw block #341

Open
xiaoxuan-yu opened this issue Jun 24, 2024 · 3 comments
Open

Unable to highlight code in raw block #341

xiaoxuan-yu opened this issue Jun 24, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@xiaoxuan-yu
Copy link

Describe the bug
When try to use tinymist in my project, I found the code in raw block is not highlighted. By inspecting editor token and scope, the results shows only typst.
image

Package/Software version:
VSCode version(Help -> About):

Vesion: 1.90.0
Commit: 89de5a8d4d6205e5b11647eb6a74844ca23d2573
Sate: 2024-06-04T19:43:07.605Z
Electron: 29.4.0
ElectronBuildId: 9593362
Chromium: 122.0.6261.156
Node.js: 20.9.0
V8: 12.2.281.27-electron.0
OS: Linux x64 6.5.0-1023-oem

tinymist extension version: v0.11.0. Get it by tinymist --version in terminal.

tinymist 
Build Timestamp:     2024-06-17T05:47:43.517039979Z
Build Git Describe:  v0.11.11-dirty
Commit SHA:          1c653d5fd28706e27077f8a2d49e6e7f072c2bb2
Commit Date:         None
Commit Branch:       None
Cargo Target Triple: x86_64-unknown-linux-gnu
Typst Version:       0.11.1

Is that a unimplemented feature or a bug?

@Myriad-Dreamin
Copy link
Owner

This is implemented but introduces bug so I disabled it.

https://github.com/Myriad-Dreamin/tinymist/blob/main/syntaxes/textmate/fenced.ts

The case of bug, when your code in raw block has grammar errors, the highlighting after the raw block will be messy:

The document ```c++
class BuggyCxxCode
``` will be messy.
/// vscode continues parsing c++ grammar after the block
class is hightlighted.

@Myriad-Dreamin Myriad-Dreamin added the enhancement New feature or request label Jun 24, 2024
@Enter-tainer
Copy link
Collaborator

I wonder how markdown deals with this

@equt
Copy link

equt commented Jul 2, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants