github rehype-pretty/rehype-pretty-code v0.12.0

latest releases: rehype-pretty-code@0.14.1, rehype-pretty-code@0.14.0, @rehype-pretty/transformers@0.13.2...
21 months ago

   🚀 Features

Migrate to Shikiji  -  by @atomiks and Dimitri POSTOLOV in #109 (b6823)

npm i rehype-pretty-code@latest shikiji@0.7.x && npm uninstall shiki
  • More semantic generated HTML.
  • [data-rehype-pretty-code-fragment] is now a <figure> element ([data-rehype-pretty-code-figure]), and the title or caption is inside a <figcaption> element.
  • Highlighted chars are now wrapped in <mark>.
  • Client-side usage works out of the box, with smaller size.
  • Multiple themes now renders a single block and uses CSS variables to change colors. data-theme has a space-separated list of the actual theme names, instead of the color mode.
  • Inline code highlighting can now be escaped.
    View changes on GitHub

Don't miss a new rehype-pretty-code release

NewReleases is sending notifications on new releases.