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

Indentation in code blocks breaks syntax highlighting #472

Closed
4 tasks done
alexisintech opened this issue Aug 23, 2024 · 6 comments · Fixed by #479
Closed
4 tasks done

Indentation in code blocks breaks syntax highlighting #472

alexisintech opened this issue Aug 23, 2024 · 6 comments · Fixed by #479
Labels
📦 area/deps This affects dependencies 🌊 blocked/upstream This cannot progress before something external happens first 💪 phase/solved Post is done 👶 semver/patch This is a backwards-compatible fix 🐛 type/bug This is a problem

Comments

@alexisintech
Copy link

Initial checklist

Affected packages and versions

unifiedjs.vscode-mdx v1.8.10

Link to runnable example

No response

Steps to reproduce

  1. Create a new MDX file in VS Code
  2. Copy the following code in to the document:
  ```js
  console.log('hi')
  ```

  ```js
  console.log('hi2')
  ```

Expected behavior

Code blocks should have correct syntax highlighting, as shown in the following image

Screenshot 2024-08-23 at 14 08 12

Actual behavior

When indented, the syntax highlighting breaks after the end of the first code block (the last triple backtick ```)

Screenshot 2024-08-23 at 14 08 04

Runtime

Other (please specify in steps to reproduce)

Package manager

No response

OS

macOS

Build and bundle tools

No response

@github-actions github-actions bot added 👋 phase/new Post is being triaged automatically 🤞 phase/open Post is being triaged manually and removed 👋 phase/new Post is being triaged automatically labels Aug 23, 2024
@wooorm
Copy link
Member

wooorm commented Aug 26, 2024

weird, cannot reproduce on https://wooorm.com/markdown-tm-language/, but can indeed reproduce in VS Code with this extension.

@remcohaszing
Copy link
Member

The issue also appears on the markdown-tm-language playground. The version hosted on https://wooorm.com/markdown-tm-language/ is outdated.

Screenshot of the markdown-tm-language playground with the issue reproduced

The version on https://mdxjs.com/playground/ also uses an outdated grammar where the issue can’t be reproduced.

The issue is reproducible on https://shiki.style/.

@remcohaszing remcohaszing added 🐛 type/bug This is a problem 📦 area/deps This affects dependencies 🌊 blocked/upstream This cannot progress before something external happens first 👶 semver/patch This is a backwards-compatible fix 🙆 yes/confirmed This is confirmed and ready to be worked on 👍 phase/yes Post is accepted and can be worked on labels Aug 30, 2024
@github-actions github-actions bot removed the 🤞 phase/open Post is being triaged manually label Aug 30, 2024

This comment has been minimized.

wooorm added a commit to wooorm/markdown-tm-language that referenced this issue Sep 3, 2024
@wooorm
Copy link
Member

wooorm commented Sep 3, 2024

ok, think I have it

This comment has been minimized.

1 similar comment

This comment has been minimized.

@remcohaszing remcohaszing added the 💪 phase/solved Post is done label Sep 8, 2024
@github-actions github-actions bot removed 👍 phase/yes Post is accepted and can be worked on 🙆 yes/confirmed This is confirmed and ready to be worked on labels Sep 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 area/deps This affects dependencies 🌊 blocked/upstream This cannot progress before something external happens first 💪 phase/solved Post is done 👶 semver/patch This is a backwards-compatible fix 🐛 type/bug This is a problem
Development

Successfully merging a pull request may close this issue.

3 participants