8000 Incorrect <Code /> highlighting for TSX-embedded Vue · Issue #15271 · withastro/astro · GitHub
[go: up one dir, main page]

Skip to content

Incorrect <Code /> highlighting for TSX-embedded Vue #15271

@jfrancos

Description

@jfrancos

Astro Info

Astro                    v5.16.12
Vite                     v6.4.1
Node                     v24.13.0
System                   macOS (arm64)
Package Manager          npm
Output                   static
Adapter                  none
Integrations             unocss (v66.6.0)
                         @astrojs/vue (v5.1.4)

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

<Code /> sets shiki highlighter langs equal to <Code /> param lang, which works great most of the time. But in the case of TSX-embedded Vue, the TSX fails to get highlighted.

What's the expected result?

I expected the full file to get highlighted, including the embedded TSX.

Link to Minimal Reproducible Example

https://stackblitz.com/github/jfrancos/shiki-astro-min-repro

Participation

  • I am willing to submit a pull request for this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    - P2: nice to haveNot breaking anything but nice to have (priority)pkg: astroRelated to the core `astro` package (scope)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0