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

Replace Prism js with Shiki #324

Open
DavieReid opened this issue Apr 18, 2023 · 2 comments
Open

Replace Prism js with Shiki #324

DavieReid opened this issue Apr 18, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@DavieReid
Copy link
Contributor

We currently use Prism for code highlighting. It doesn't seem to work very well and I have heard a lot about Shiki recently that is supposed to be better.

I think this rehype plugin would do the job rehype-pretty-code

@DavieReid DavieReid added the enhancement New feature or request label Apr 18, 2023
@lilyvc
Copy link
Contributor

lilyvc commented May 25, 2023

I attempted to do this here: https://github.com/jpmorganchase/mosaic/blob/replace-prism-with-shiki/packages/components/src/Markdown/Pre/index.tsx but got stuck with this error when serving the site
Unhandled Runtime Error TypeError: Failed to execute 'compile' on 'WebAssembly': Incorrect response MIME type. Expected 'application/wasm'.

@DavieReid
Copy link
Contributor Author

I think I had this working but had issues with light/dark mode (they both show up simultaneously). Will show u what I have when I'm back.

@DavieReid DavieReid linked a pull request Jun 6, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants