NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #3502 most downloaded on npm
syntax highlighting component for react with prismjs or highlightjs ast using inline styles
Last release 7 months ago
26 Feb 2026
Ships unpredictably
gaps range from 2 weeks to 2.6 years
Some releases are documented
notes for 34 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
11 years old
132 releases · first in 2016
Updated installation section in README.md by @quntamant in https://github.com/react-syntax-highlighter/react-syntax-highlighter/pull/633
.js by @JulesGuesnon in https://github.com/react-syntax-highlighter/react-syntax-highlighter/pull/627Full Changelog: https://github.com/react-syntax-highlighter/react-syntax-highlighter/compare/v16.1.0...v16.1.1
Bump simple-git and lint-staged by @dependabot[bot] in https://github.com/react-syntax-highlighter/react-syntax-highlighter/pull/614
Full Changelog: https://github.com/react-syntax-highlighter/react-syntax-highlighter/compare/v16.0.0...v16.1.0
One column per quarter.
16.0.0 brings a major version update to the refractor dependency, which remedies some security issues but could result in a breaking change to your ap…
16.0.0 brings a major version update to the refractor dependency, which remedies some security issues but could result in a breaking change to your app's dependencies. Please update with care.
Full Changelog: https://github.com/react-syntax-highlighter/react-syntax-highlighter/compare/v15.6.6...v16.0.0
Updated overrides block attempting to solve transitive prismjs dependency issue:
Updated overrides block attempting to solve transitive prismjs dependency issue:
"overrides": {
"prismjs": "^1.30.0",
"refractor": {
"prismjs": "^1.30.0"
}
}
Full Changelog: https://github.com/react-syntax-highlighter/react-syntax-highlighter/compare/v15.6.5...v15.6.6
Bump elliptic from 6.5.5 to 6.6.0 by @dependabot[bot] in https://github.com/react-syntax-highlighter/react-syntax-highlighter/pull/576
Full Changelog: https://github.com/react-syntax-highlighter/react-syntax-highlighter/compare/v15.6.4...v15.6.5
Override refractor 3.6.0's prismjs dependency by @simmerer in https://github.com/react-syntax-highlighter/react-syntax-highlighter/pull/605
refractor 3.6.0's prismjs dependency by @simmerer in https://github.com/react-syntax-highlighter/react-syntax-highlighter/pull/605Full Changelog: https://github.com/react-syntax-highlighter/react-syntax-highlighter/compare/v15.6.3...v15.6.4
fix line count error by @bbbert in https://github.com/react-syntax-highlighter/react-syntax-highlighter/pull/583
Full Changelog: https://github.com/react-syntax-highlighter/react-syntax-highlighter/compare/v15.6.2...v15.6.3
Upgrade prismjs dependency by @SMG-717 in https://github.com/react-syntax-highlighter/react-syntax-highlighter/pull/599
Full Changelog: https://github.com/react-syntax-highlighter/react-syntax-highlighter/compare/v15.6.1...v15.6.2
Fix: #487 Fix: Allow override of display: styles when wrapLongLines is true
Feat: #555 Add Vue language support
Been awhile! 😰
https://github.com/react-syntax-highlighter/react-syntax-highlighter/pull/466: updated prismjs to 1.27.0, fixing the XSS vuln mentioned in https://git
As noted in the PR, updating prism usually brings along a few surprises; this one gave us a new programming language named false, which as you can imagine is fun to import and parse within Javascript.
Thanks to everyone for your patience. We'll be getting back in the groove of regular releases here.
Nothing published for this version
Nothing published for this version
Fixed a version-pin regression for highlight: we're now at highlight 10.4.1 and lowlight 1.17.0 as intended.
Fixed a version-pin regression for highlight: we're now at highlight 10.4.1 and lowlight 1.17.0 as intended.
Thanks for @tu4mo for catching this one!
bumped lowlight to 1.17.0 to resolve highlight dependency version mismatches: https://github.com/react-syntax-highlighter/react-syntax-highlighter/pul
lowlight to 1.17.0 to resolve highlight dependency version mismatches: https://github.com/react-syntax-highlighter/react-syntax-highlighter/pull/344Thanks to @aurelien-reeves for his first PR here!
prevented an inadvertent last-line line number from appearing: https://github.com/react-syntax-highlighter/react-syntax-highlighter/pull/341
.25em to avoid code misalignments: https://github.com/react-syntax-highlighter/react-syntax-highlighter/pull/342Bumped highlight.js to 10.4.1, fixing a security vulnerability. This brought along a few additions:
Bumped highlight.js to 10.4.1, fixing a security vulnerability. This brought along a few additions:
highlight languagesnodeRepl (node-repl)highlight stylesgradientLightstackoverflowDarkstackoverflowLight@karlhorky added a fourth level of powerset permutations, ensuring nested objects end up with the correct combination of classnames
This adds three new Prism themes:
prismjs 1.22.0refractor 3.2.0prism-themes 1.5.0This adds three new Prism themes:
coldark-coldcoldark-darkcoy-without-shadowsAnd eight new Prism-supported languages:
birbbslmongodbnaniscriptpurescriptsmlstantyposcriptreact-syntax-highlighter-virtualized-renderer in the READMEThanks to @dschaller, @cheapsteak, and @karlhorky for contributing!
https://github.com/react-syntax-highlighter/react-syntax-highlighter/pull/317 - Minor fix related to yesterday's 15.2.0 release (thank you for taking
https://github.com/react-syntax-highlighter/react-syntax-highlighter/pull/314 - Updates style-applying logic. Language-specific styles for a given the
Thanks again to @karlhorky, who is on a roll here!
https://github.com/react-syntax-highlighter/react-syntax-highlighter/pull/313 - updated to prism-themes 1.4.1
prism-themes 1.4.1Just a minor update to regenerate local Prism themes that employed nested token styling:
Just a minor update to regenerate local Prism themes that employed nested token styling:
darculashades-of-purplesynthwave84vs…styling of nested tokens via CSS. Technically a breaking change for theme styling, though it fixes a feature that didn't actually work for themes prio…
Props to @karlhorky for incredibly detailed and patient work on this.
Show line numbers only when showLineNumbers == true - https://github.com/react-syntax-highlighter/react-syntax-highlighter/pull/312 (thanks to @Abhyud
showLineNumbers == true - https://github.com/react-syntax-highlighter/react-syntax-highlighter/pull/312 (thanks to @AbhyudayaSharma for this one!)showLineNumbers and showInlineLineNumbers for expected behavior> This could be a breaking change if you're using showLineNumbers and are expecting a separate element containing your line numbers. If you want to ke…
See https://github.com/react-syntax-highlighter/react-syntax-highlighter/pull/309 for details.
wrapLongLinesshowInlineLineNumbers={true}Yes that's a confusingly-named prop. We'll fix that soon
This could be a breaking change if you're using
showLineNumbersand are expecting a separate<code>element containing your line numbers. If you want to keep that behavior, you'll now need to explicitly passshowInlineLineNumbers={false}
wrapLongLines functionality, RSH applies explicit white-space styling on the <code> tag.This could be a breaking change if the inline style overrides a
white-spaceproperty that you're supplying via external CSS.
Remembered to update CHANGELOG at the same time as version change. We'll get this right from now on!
Remembered to update CHANGELOG at the same time as version change. We'll get this right from now on!
recreated/updated CHANGELOG for versions 10.x through current, fixing https://github.com/react-syntax-highlighter/react-syntax-highlighter/issues/214
https://github.com/react-syntax-highlighter/react-syntax-highlighter/issues/301: brought back createElement that went missing as of version 13.5.
createElement that went missing as of version 13.5.import createElement from "react-syntax-highlighter/create-element";
Thanks to @samuela for spotting this one.
https://github.com/react-syntax-highlighter/react-syntax-highlighter/pull/299: clean up old files in project root, add jest to eslint
Grateful to @ktmud for stepping in with that improvement.
refractor 3.1.0, which brings in prismjs 1.21.0. We'd pinned react-syntax-highlighter 13.3.1 to prismjs 1.21.0, but didn't realize that refractor's dependency would keep us at 1.20.0JS error when using lineNumberStyle() for inline line numbers
<pre> when using Prism (https://github.com/react-syntax-highlighter/react-syntax-highlighter/pull/297)Thanks to @ktmud for jumping in with contributions!
prism updated to 1.21.0, with lots of improvements: CHANGELOG for prism 1.21.0
prism updated to 1.21.0, with lots of improvements: CHANGELOG for prism 1.21.0shell-session language command outputuseInlineStyles={false}Thanks to @urish and @prichey for contributing PRs!
Minor bugfix: neglected to include rebuilt "Prism async light" demo files in 13.2.0 release
Minor bugfix: neglected to include rebuilt "Prism async light" demo files in 13.2.0 release
Updates our prism-themes dependency to pull in new themes, including vsc-dark-plus
prism-themes dependency to pull in new themes, including vsc-dark-plusa11yDarkdraculamaterialDarkmaterialLightmaterialOceanicnordshadesOfPurplesynthwave84vscDarkPlusindicate that Highlight powers the default demo
Highlight v10 introduced some breaking changes for us here which we've worked around, but shouldn't cause breakage for most people relying on react-sy…
highlight ^10.1.1 and lowlight ^1.14.0 dependenciesrefractor ^3.0.0 and prism ^1.20.0 dependencies<SyntaxHighlighter
showLineNumbers={true} // required to show line numbers, whether inline or not
showInlineLineNumbers={true} // render them inside wrapped lines, instead of as a separate <code> block
renderer={virtualizedRenderer({
rowHeight: 20
})}
>
{code}
</SyntaxHighlighter>
When paired with showLineNumbers={true}, showInlineLineNumbers={true} injects line numbers into each wrapped line of code, instead of creating a separate <code></code> block for the numbers. This allows line numbering to work with virtualized renderers such as react-syntax-highlighter-virtualized-renderer.
Inline line numbers are styled so that they're not selected when drag-selecting multiple lines of highlighted text, preserving expected behavior.
darkula theme from highlight.js, highlight v10 has renamed that style to darcula.Highlight v10 introduced some breaking changes for us here which we've worked around, but shouldn't cause breakage for most people relying on react-syntax-highlighter and not consuming highlight.js directly.
Note:
react-syntax-highlighterprovides an automated build wrapper around styles and languages provided byhighlight.js(vialowlight) andprism(viarefractor). Changes here are simply describing what's changed in those libraries. If you'd like to see another language or style added, please contribute to those libraries.
cLike (c-like)clatexphpTemplate (php-template)pythonRepl (python-repl)cs (renamed to csharp)nimrod (renamed to nim)tex (removed)antlr4aqlbbcodebrightscriptconcurnasdaxetluaexcelFormula (excel-formula)factorfirestoreSecurityRules (firestore-security-rules)ftlgdscriptlattellvmmoonscriptneonpowerqueryqmlrobotframeworksoliditysolutionFile (solution-file)sparqlsqfturtlezigNothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →