Skip to content

Problematic syntax highlighting with VitePress markdown files #4734

@rileychh

Description

@rileychh

Vue - Official extension or vue-tsc version

2.0.28

VSCode version

1.92.2

Vue version

3.4.38

TypeScript version

5.5.4

System Info

System:
  OS: Linux 6.10 Arch Linux
  CPU: (16) x64 Intel(R) Core(TM) i5-14400
  Memory: 13.31 GB / 31.09 GB
  Container: Yes
  Shell: 3.7.1 - /usr/bin/fish
Binaries:
  Node: 20.17.0 - /usr/bin/node
  npm: 10.8.2 - /usr/bin/npm
  pnpm: 9.9.0 - /usr/bin/pnpm
Browsers:
  Chromium: 128.0.6613.84

Steps to reproduce

  1. Create a project with npx vitepress init
  2. Configure tsconfig.json and .vscode/config.json as told in feat: redesign additional extensions, VitePress, PetiteVue support #4321
  3. Add <script setup> block to index.md
  4. Check syntax highlighting of index.md

What is expected?

The syntax highlighting in the <script setup> block is correctly rendered.

What is actually happening?

The syntax highlighting for the <script setup> block in the Markdown file is misaligned.
Syntax highlighting of index.md

Link to minimal reproduction

https://github.com/rileychh/vitepress-vue-tsc-repro

Any additional comments?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions