NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm
Central methods and themes for code highlighting in Scalar projects
Latest stable
0.4.17
Last release 4 days ago
25 Nov 2026
Ships fairly regularly
a new release about every 2 weeks
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
2 years old
67 releases · first in 2024
Drag across the ruler to compare, or tap a release to open it.
Share the Markdown renderer with @scalar/code-highlight while preserving its Lowlight language detection.
#11195: Update compatible dependencies for AI chat, focus management, code and Markdown rendering, HTTP requests, mock servers, and application data fetching.
#11190: Escape HTML text in plain Markdown paragraphs independently of the checks that select the shortcut.
Share the Markdown renderer with @scalar/code-highlight while preserving its Lowlight language detection.
### Patch Changes - #11099: Update compatible runtime and styling dependencies, align editor dependency versions, and preserve document-change compari
Your coding agent can read these notes before it upgrades. Set up the MCP server →
### Patch Changes - #11004: Preserve package output paths and application aliases when building with TypeScript 6.
### Patch Changes - #11011: Make Vite configuration imports compatible with the native config loader.
### Patch Changes - #10923: Update the bundled mdast-util-to-hast to 13.2.1 to fix CVE-2025-66400 (unsanitized class attribute).
### Patch Changes - #10742: Restore the 1.4 default for highlighted code block containers after the highlighter migration, including plain text and bl
line-height was declared on :where(code.hljs) *, which reaches elements and never text nodes. A highlighter emits a token span only where it has a sco
#9939: Fix a code line rendering shorter than its neighbours when nothing on it is highlighted
line-height was declared on :where(code.hljs) *, which reaches elements and never text nodes. A highlighter emits a token span only where it has a scope to give, so a line of entirely unscoped text — the content between two JSX tags, for example — carried no element, fell back to the surrounding line height, and rendered about two pixels shorter than the lines around it.
Line numbers hid this. That mode wraps every line in span.line, which is an element, so the same block rendered evenly with a gutter and unevenly without one. The declaration now sits on code.hljs itself, so it sets the line box for every line and the spans inherit it.
#10721: Update compatible dependencies while retaining the existing Node.js support and five-day release-age policy.
### Patch Changes - #10614: Clean up lint warnings while preserving runtime behavior, and document intentional schema and type syntax.
### Patch Changes - #10559: Clean up Biome warnings in package code and tests. Handle rejected debounced callbacks and await streaming writes. - #1050
### Patch Changes - #10459: Share one lowlight instance per language registry between syntaxHighlight and htmlFromMarkdown instead of registering and
syntaxHighlight and htmlFromMarkdown instead of registering and compiling every grammar for each code block, and replace it after a grammar fails to compile so later blocks that embed that grammar keep their text### Patch Changes - #10212: Improve type safety for schema display metadata, schema property merging, deprecated configuration migration, and cyclic t
htmlFromMarkdown rebuilt its twelve-plugin unified chain on every call, and each of those rebuilds ran createLowlight(standardLanguages), re-registeri
#10074: perf(code-highlight): reuse the markdown processor and skip the pipeline for plain paragraphs
htmlFromMarkdown rebuilt its twelve-plugin unified chain on every call, and each of those rebuilds ran createLowlight(standardLanguages), re-registering all 57 syntax grammars before rendering. Rendering a single API description paid for a whole highlighter. Profiling an API reference schema put 34-44% of the time in markdown, roughly 70% of it in construction rather than parsing.
Two changes. One lazily created lowlight instance is now shared through rehypeHighlight's lowlight option, and the processor is frozen and cached per option set (sorted removeTags, sorted allowTags, transform type). Calls that pass a transform callback still build per call, because the callback receives the AST. Separately, a description that is a single plain line with no markdown, HTML or collapsible whitespace now returns the paragraph the pipeline would have produced, without running it.
Output is unchanged. Every unique description in the Stripe OpenAPI document (5,167 of them), plus targeted probes across seven option sets and 40,000 random strings drawn from an alphabet of the excluded metacharacters, render byte-identically before and after.
Two caches now live for the process lifetime: the grammar registry and the processor map. Both are immutable once built, and the registry is only mutated through an aliases option this package never passes.
### Patch Changes - #9941: Republish every package through npm trusted publishing. No functional changes.
### Patch Changes - #9719: docs: update the Scalar platform overview block in the README
### Patch Changes - #9710: Republish so the updated README (with the Scalar platform overview) reaches npm. Also renames the README generator metadata
readme to scalarReadme: npm treats a readme field as the readme text itself, so affected packages were published with a literal [object Object] readme on the registry instead of README.md.Syntax highlighting is now best-effort: if a highlight.js grammar throws at runtime (for example a Unicode regex that a production minifier mangles),
#9659: fix: keep rendering Markdown when a code block fails to highlight
Syntax highlighting is now best-effort: if a highlight.js grammar throws at runtime (for example a Unicode regex that a production minifier mangles), the code block falls back to plain text instead of the error taking down the whole Markdown section.
### Minor Changes - #9590: Add syntax highlighting for the Mojo programming language
### Patch Changes - #9508: Fix Python code samples appearing mostly unstyled by highlighting function and method call sites - #9506: Add Scalar scroll
### Patch Changes - #9451: Bundle runtime dependencies into the build so CommonJS-only packages (like extend and debug) no longer leak to consumers an
extend and debug) no longer leak to consumers and break Vite dev under pnpm### Patch Changes - #8964: fix markdown inside HTML text tags like so inline formatting is rendered.
<p> so inline formatting is rendered.### Patch Changes - #8735: fix: replace direct cjs mime and curl dependencies with local implementations
### Patch Changes - #8664: refactor: replace wildcard export barrels with explicit named re-exports
### Patch Changes - #8466: chore: new build pipeline
### Minor Changes - #8322: chore: bump required node version to >=22 (LTS)
### Patch Changes - #8248: feat: slugs for headings with nested content
### Patch Changes - #8081: feat(components): improve ScalarCodeBlock copy UI
### Patch Changes - #7527 `93ffb63` Thanks @amritk! - feat: allow all classes in markdown
### Patch Changes - #7441 `781f264` Thanks @marcalexiei! - fix(code-highlight): remove highlightjs-vue unused dependency - #7441 `781f264` Thanks @mar
#7441 781f264 Thanks @marcalexiei! - fix(code-highlight): remove highlightjs-vue unused dependency
#7441 781f264 Thanks @marcalexiei! - fix(code-highlight): remove unused languages
0aa6d26: feat: add ~45 new highlight.js languages + alias maps and new grouped exports (mediumLanguages, specializedLanguages, allLanguages)
d4cb86b: fix: removes inline block display to keep caret in empty code input usage
85ee2ce: feat: updates markdown alert component style
6ab3a21: feat: updates markdown details component style
903f975: feat: increases code line margin to enhance alignment
2d7f995: refactor: use more common straight apostrophe ' instead of the real apostrophe ’
7913193: feat: updates hljs curl language style
4156f1d: Expand workspace store integration
00fc827: feat: updates markdown overall style
785939b: feat: adds id to markdown heading
483ca93: chore: require Node 20 (or above)
8c7bad8: chore: move build tooling to esbuild
e8457cb: Unify themes across scalar. Cleanup interface and remove CJS build.
799845f: feat(components): allow ScalarCodeblock to support different font sizes
0e888bc: feat: add dart to standard languages
632978d: fix(themes): hide summary caret in reset
9319c0c: fix: allows alert plugin classes in markdown
3feee27: feat: adds markdown alert support
### Patch Changes - e350f23: chore: code style
fa6afe8: chore: code formatting
109e320: fix: removes regex for highlight credentials
6407b2b: feat(api-reference): extend font weights for links and sidebar items
e199e9b: feat: updates chevron down icon
9002259: style: font size fixtures
1b06f64: fix(api-reference): conflicting styles with bulma, galaxy bug on docs
a40999d: chore: added type safety rule noUncheckedIndexedAccess
b4a93ab: fix: tag typography and intro type
0c34a18: chore: updated vue package to 3.5
### Patch Changes - e911047: Add default exports
18744d4: feat(code-highlight): don't force markdown paragraph color
c450bb3: fix: scalar api ref use scalar-border-width
58e5912: fix: markdown fixes and intro card polish
One column per month.