Repository navigation
Patch Changes
-
Feat: add a
cacheoption. Pass aMapand highlighted output is kept across unmounts, so remounting unchanged code (switching chat threads, virtualized lists) paints on the first render without highlighting again. Output is stored on unmount, so partial code from streaming never lands in the cache, and entries are keyed by code, language, theme and options.#208161cb25@AVGVSTVS96const cache = new Map(); <ShikiHighlighter language="tsx" theme="github-dark" cache={cache}> {code} </ShikiHighlighter>;