pngwn / MDsveX

A markdown preprocessor for Svelte.
https://mdsvex.pngwn.io
MIT License
2.36k stars 102 forks source link

Code transformers that replace entities do not play nice with the built in highlighter #304

Open pngwn opened 3 years ago

pngwn commented 3 years ago

Details: https://github.com/pngwn/MDsveX/issues/93#issuecomment-877834159

pngwn commented 3 years ago

This may just be a docs issue but need to be resolved one way or the other for v1.

LeoDog896 commented 1 year ago

I've encountered the same issue when integrating with rehype-pretty-code. Explicitly, I've set the highlight configuration option to false, but the HTML entity transformation still happens in it. If you need an example to test on, do let me know :+1:.

willuhmjs commented 1 year ago

I've encountered the same issue when integrating with rehype-pretty-code. Explicitly, I've set the highlight configuration option to false, but the HTML entity transformation still happens in it. If you need an example to test on, do let me know 👍.

I second this and can do the same.

willuhmjs commented 1 year ago

This is a pretty big issue and I haven't seen any movement. Are there any workarounds to this?

LeoDog896 commented 1 year ago

I was able to fix my issue by manually patching the plugin I was using to forcibly use svelte-like encodings: rehype-pretty-code patch and shiki patch.