Rehype Pretty Code is a tool for creating “beautiful code blocks” in Markdown or MDX documentation. It supports syntax highlighting and is often used with ecosystems like MDX and related workflows (for example via shiki-based highlighting).
Project status
- Actively maintained: the most recent updates were very recent (rehype-pretty-code 0.14.4 on 2026-07-06, just days before 2026-07-09), and the 2026 updates include user-visible bug fixes.
- Apparent update cadence: after earlier releases in 2024 and 2025, there was a March 2026 update (0.14.3 on 2026-03-03) followed by a further patch in early July 2026 (0.14.4), suggesting roughly a few-month cadence in the latest period.
AI summary generated
Recent updates
rehype-pretty-code@0.14.4
rehype-pretty-code@0.14.4 is a patch release that focuses on fixing an infinite loop during inline character highlighting. The release notes specifically call out matches that span multiple syntax tokens and occur more than once on the same line.
rehype-pretty-code@0.14.3
rehype-pretty-code@0.14.3 is a patch release focused on upgrading Shiki support to Shiki 4, along with documentation updates for Shiki's renamed highlighter creation API. It also includes a CI workflow adjustment to accommodate npm OIDC trusted publishing.
Featuresrehype-pretty-code@0.14.1
rehype-pretty-code@0.14.1 updates its Shiki integration to use Shiki’s singleton highlighter API and declares support for Shiki 3. The main library change is in the core package where the default highlighter factory is switched to `getSingletonHighlighter`.
rehype-pretty-code@0.14.0
rehype-pretty-code@0.14.0 is a minor release that introduces an option to bypass inline code blocks. The provided release notes only document that change, and do not mention any other user-facing behavior changes.
Features@rehype-pretty/transformers@0.13.2
v0.13.2 is primarily a patch release focused on UI behavior fixes (rounded handling with titles, and preventing start line numbers from being highlighted). The release notes also introduce the new package @rehype-pretty/transformers with an initial transformer, copy-button.
Featuresrehype-pretty-code@0.13.2
rehype-pretty-code@0.13.2 includes targeted bug fixes around line number highlighting and how rounded styles are modified when titles are present. It also introduces a new companion package, @rehype-pretty/transformers, with the first transformer, @rehype-pretty/transformers/copy-button, including example usage in the repository.
Featuresv0.13.1
v0.13.1 primarily addresses repeated highlighter initialization by caching the Shiki highlighter based on the selected theme. The release notes describe this as a memory leak fix when `rehypePrettyCode` is invoked multiple times with a non-stable `options` object reference.
v0.13.0
v0.13.0 upgrades the plugin from shikiji to shiki v1. The codebase now imports highlighter and theme types directly from shiki and updates transformer typing to match the new transformer package.
Breakingv0.12.6
v0.12.6 upgrades shikiji to 0.10 and fixes highlighting for multi-character selections that omit an explicit range. The diff also includes several repository-only updates (examples, website, and release workflow).
Featuresv0.12.5
v0.12.5 is a small release focused on fixing TypeScript exports so consumers can import the library's public types. The code diff shows new re-exports of several types from src/types, plus minor package metadata changes.
v0.12.4
v0.12.4 includes two documented bug fixes: preventing line collapsing in `grid: true` mode for plaintext blocks, and ignoring code blocks with `lang: math`. While the release notes only mention those behavior fixes, the diff also shows significant package build and type export restructuring plus an entrypoint filename change.