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

Syntax highlight themes not interpreting TS properly #1701

Closed
clemcode opened this issue Nov 22, 2022 · 1 comment · Fixed by #1703
Closed

Syntax highlight themes not interpreting TS properly #1701

clemcode opened this issue Nov 22, 2022 · 1 comment · Fixed by #1703
Assignees
Labels
bug Something isn't working

Comments

@clemcode
Copy link
Contributor

clemcode commented Nov 22, 2022

Environment


  • Operating System: Linux
  • Node Version: v16.14.2
  • Nuxt Version: 3.0.0
  • Nitro Version: 1.0.0
  • Package Manager: npm@7.17.0
  • Builder: vite
  • User Config: modules, content
  • Runtime Modules: @nuxt/content@2.2.2
  • Build Modules: -

Reproduction

https://stackblitz.com/edit/github-3zzmac?file=nuxt.config.ts,content%2Findex.md

(See also https://nuxt.com/docs/api/composables/use-fetch#type)

Describe the bug

When a TS Type entry is marked as optional with ?: and preceded with a = (triggering the highlight of the lines below) at some point in the code block, the rendered HTML is cut of several characters.

Bad

type UseFetchOptions = {
  key?: string
}

Good

type UseFetchOptions {
  key?: string
}

EDIT: Also happens with other tokens, such as => under certain circumstances. (See Stackblitz repro)

Impacted themes (I didn't test them all): github-light, github-dark, monokai

Additional context

First reported here: nuxt/nuxt#15526

Copy link
Member

The issue fixed in Edge version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants