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

Upgrading from 1.23.1 to 1.24.0 adds unwanted underlines and italics to Monaco #856

Open
3 of 5 tasks
haines opened this issue Dec 3, 2024 · 0 comments
Open
3 of 5 tasks

Comments

@haines
Copy link

haines commented Dec 3, 2024

Validations

Describe the bug

After upgrading shiki and @shikijs/monaco from 1.23.1 to 1.24.0, whitespace became underlined and braces and brackets became italicized in our Monaco editors displaying YAML or JSON (using dracula-soft theme).

The same effect was not present in our static code blocks (which render with codeToHast and hast-util-to-jsx-runtime).

In the below screenshots you can see a Monaco editor on the left and a static code block on the right. Prior to the upgrade, they looked pretty much the same (except Monaco has colorized brackets).

1.24.0

Screenshot 2024-12-03 at 13 49 14

1.23.1

Screenshot 2024-12-03 at 13 51 19

Reproduction

https://github.com/haines/shiki-monaco-1.24.0-underlines

There are two branches in the repo, 1.24.0 (the default) and 1.23.1. Run with

pnpm install
pnpm run dev
open http://localhost:5173/

Contributes

  • I am willing to submit a PR to fix this issue
  • I am willing to submit a PR with failing tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant