Skip to content

Releases: react-syntax-highlighter/react-syntax-highlighter

15.0.1

04 Oct 01:38
Compare
Choose a tag to compare

Just a minor update to regenerate local Prism themes that employed nested token styling:

  • darcula
  • shades-of-purple
  • synthwave84
  • vs

Check 'em out in the Prism demo.

15.0.0

04 Oct 00:59
Compare
Choose a tag to compare

Changes

  • #305 - Corrects a longstanding flaw in our token highlighting, allowing 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 prior to this anyway!

Props to @karlhorky for incredibly detailed and patient work on this.

14.0.2

04 Oct 00:37
Compare
Choose a tag to compare

Bugfix

  • Show line numbers only when showLineNumbers == true - #312 (thanks to @AbhyudayaSharma for this one!)

Added tests

  • explicitly test combinations of showLineNumbers and showInlineLineNumbers for expected behavior

14.0.0

02 Oct 05:05
Compare
Choose a tag to compare

Changes

See #309 for details.

TL;DR:

  • New prop: wrapLongLines
  • New default prop value: showInlineLineNumbers={true}

Yes that's a confusingly-named prop. We'll fix that soon

This could be a breaking change if you're using showLineNumbers and are expecting a separate <code> element containing your line numbers. If you want to keep that behavior, you'll now need to explicitly pass showInlineLineNumbers={false}

  • Thanks to the new 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-space property that you're supplying via external CSS.

13.5.3

03 Sep 20:26
Compare
Choose a tag to compare

Documentation update again

Remembered to update CHANGELOG at the same time as version change. We'll get this right from now on!

13.5.2

03 Sep 20:25
Compare
Choose a tag to compare

Documentation update

  • recreated/updated CHANGELOG for versions 10.x through current, fixing #214

13.5.1

20 Aug 04:41
Compare
Choose a tag to compare

Bugfix:

  • #301: brought back createElement that went missing as of version 13.5.
import createElement from "react-syntax-highlighter/create-element";

Thanks to @samuela for spotting this one.

13.5.0

17 Aug 19:43
Compare
Choose a tag to compare

Enhancements

  • #299: clean up old files in project root, add jest to eslint

Grateful to @ktmud for stepping in with that improvement.

Dependency updates

  • #300: Updated to 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.0

13.4.0

14 Aug 22:50
Compare
Choose a tag to compare

Bugfixes

  • JS error when using lineNumberStyle() for inline line numbers (#296)
  • incorrect 'hljs' className applied to <pre> when using Prism (#297)

Enhancements

  • added ESLint (#298)
  • added favicon to demo (#295)
  • new addition to the "built with" list (#293)

Thanks to @ktmud for jumping in with contributions!

13.3.1

08 Aug 19:15
Compare
Choose a tag to compare

Updates

  • prism updated to 1.21.0, with lots of improvements: CHANGELOG for prism 1.21.0
  • added Github repo link to the upper right corner of demo pages

Bugfixes

  • #287 - Truncated Prism shell-session language command output
  • #285 - Incorrect syntax highlighting for mutli-line comments
  • #278 - Unexpected behavior with useInlineStyles={false}

Thanks to @urish and @prichey for contributing PRs!