Open joepio opened 9 months ago
Only if the switch is moving from client-side highlight.js to build-side Prism.
Client-side highlight.js & Prism both are incredibly wasteful for documentation. For the most part, your documentation’s code samples aren’t changing so why is mdBook shipping client-side parsing libraries at all & making all downstream users parse & highlight the exact same unchanging content when this tool should be doing the syntax highlighting at build time to save energy, data, & time for users. See also: https://github.com/rust-lang/mdBook/issues/1383
Problem
The current highlighter (powered by highlight.ts) does not support
.tsx
.Proposed Solution
Switch to
Prism
Notes
Some related discussions:
https://github.com/highlightjs/highlight.js/issues/3625