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: GitHub upstream was pushed on 2026-07-25, with a sequence of recent updates (0.14.5 on 2026-07-25, 0.14.4 on 2026-07-06, 0.14.3 on 2026-03-03), indicating ongoing responsiveness.
- Update cadence: patch-level cadence is fairly steady, roughly every few weeks to months recently (about 19 days between 0.14.5 and 0.14.4, about 4 months between 0.14.4 and 0.14.3), and recent updates are clustered within 2026.
AI summary generated
Recent updates
rehype-pretty-code@0.14.5
rehype-pretty-code 0.14.5 is a patch release focused on correcting how `showLineNumbers` is detected in the code block meta string, including when it appears after highlight tokens. It also fixes character-highlight range handling so ranges do not leak into later patterns, including id-only annotations like `/foo/#a`.
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.