Open DavieReid opened 1 year ago
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'.
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.
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