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

🐛 BUG: Astro extension and mdx extension working at the same time causes mdx highlighting error. #949

Closed
liruifengv opened this issue Sep 3, 2024 · 1 comment · Fixed by #950
Labels
needs triage Issue needs to be triaged

Comments

@liruifengv
Copy link
Member

Describe the Bug

Astro extension and mdx extension working at the same time causes mdx highlighting error.

I installed version 2.10.2 and everything works fine, when installing a version larger than 2.11, I get a highlighting error.

2.10.2

image

2.11

image

I think the problem may be related to this PR: #878

Steps to Reproduce

  1. Installing the Astro extension and the mdx extension in VSCode at the same time
  2. Open our docs repository and open the api-reference.mdx page.
  3. Then you can see the highlighting error

image

Link to Minimal Reproducible Example

https://github.com/withastro/docs/blob/main/src/content/docs/en/reference/api-reference.mdx

@github-actions github-actions bot added the needs triage Issue needs to be triaged label Sep 3, 2024
@ArmandPhilippot
Copy link

ArmandPhilippot commented Sep 4, 2024

I don't know if this is always the case, but highlighting seems to break due to fenced codes that use astro language. For example in src/content/docs/en/reference/api-reference.mdx if you do the following change at line 17:

-```astro
+```

You'll see that the next lines are correctly highlighted until the next code block that uses astro as language (while having both extensions enabled).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage Issue needs to be triaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants