npm / rehype-pretty-code
rehype-pretty-code
What changed in rehype-pretty-code 0.14, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-20.
1 behavior and defaults5 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initrehype-pretty-code 0.146 changes
Behavior and default changes 1
Adds support for Shiki 4.
Fixes and other changes 5
Character-highlight ranges no longer leak across patterns, so a later pattern does not inherit a previous pattern's range.
Partial highlights inside a transformer-generated element preserve the surrounding semantic element instead of cloning it.
Range-ignored occurrences no longer consume the whole token; excluded occurrences are counted without changing the token tree, preserving unhighlighted markup.
Detects showLineNumbers wherever it appears in the meta string, while ignoring it when it is part of a character highlight.
Prevents an infinite loop when a pattern matches text spanning multiple syntax tokens and occurs more than once on the same line.