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

Broken Kotlin syntax hightlighting #1171

Closed
3 tasks done
SlamaFR opened this issue Aug 15, 2022 · 1 comment
Closed
3 tasks done

Broken Kotlin syntax hightlighting #1171

SlamaFR opened this issue Aug 15, 2022 · 1 comment
Labels
bug: pending triage Maybe a bug, waiting for confirmation

Comments

@SlamaFR
Copy link

SlamaFR commented Aug 15, 2022

Describe the bug

I'm writing code blocks in Java and Kotlin but the Kotlin ones do not render correctly. There no 'Kt' or 'Kotlin' mention in the upper right corner like other languages and the syntax hightlighting is very poor.

Reproduction

Write a code block with Kotlin code :

```kotlin
val notchHead = SkullBuilder()
    .ownerName("notch")
    .build()
```

Look at the produced result

Expected behavior

The code block should mention 'Kotlin' in the upper right corner and the code should be correctly colored.

System Info

❯ npx envinfo --system --npmPackages vitepress --binaries --browsers
Need to install the following packages:
  envinfo@7.8.1
Ok to proceed? (y) y

  System:
    OS: macOS 12.3.1
    CPU: (10) arm64 Apple M1 Pro
    Memory: 78.88 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 18.0.0 - /opt/homebrew/bin/node
    Yarn: 1.22.18 - /opt/homebrew/bin/yarn
    npm: 8.15.0 - /opt/homebrew/bin/npm
  Browsers:
    Chrome: 104.0.5112.79
    Safari: 15.4
  npmPackages:
    vitepress: ^1.0.0-alpha.4 => 1.0.0-alpha.4

Additional context

Just to compare, here is a working block using Java syntax

And here is a broken Kotlin one

Validations

  • Follow our Code of Conduct
  • Read the docs.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
@SlamaFR SlamaFR added the bug: pending triage Maybe a bug, waiting for confirmation label Aug 15, 2022
@brc-dd
Copy link
Member

brc-dd commented Aug 15, 2022

Regarding syntax highlighting, you can create an issue on Shiki's GitHub. And for that top corner thing, it was fixed (#875) and will be there in the next release.

@brc-dd brc-dd closed this as completed Aug 15, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug: pending triage Maybe a bug, waiting for confirmation
Projects
None yet
Development

No branches or pull requests

2 participants