Skip to content

Releases: rehype-pretty/rehype-pretty-code

v0.12.1

08 Dec 08:12
Compare
Choose a tag to compare

   🚀 Features

   🐞 Bug Fixes

    View changes on GitHub

v0.12.0

03 Dec 07:20
Compare
Choose a tag to compare

   🚀 Features

Migrate to Shikiji  -  by @atomiks and Dimitri POSTOLOV in #109 (b6823)

npm i rehype-pretty-code@latest shikiji@0.7.x && npm uninstall shiki
  • More semantic generated HTML.
  • [data-rehype-pretty-code-fragment] is now a <figure> element ([data-rehype-pretty-code-figure]), and the title or caption is inside a <figcaption> element.
  • Highlighted chars are now wrapped in <mark>.
  • Client-side usage works out of the box, with smaller size.
  • Multiple themes now renders a single block and uses CSS variables to change colors. data-theme has a space-separated list of the actual theme names, instead of the color mode.
  • Inline code highlighting can now be escaped.
    View changes on GitHub

v0.11.0

30 Nov 10:29
Compare
Choose a tag to compare

   🐞 Bug Fixes

Upgrades to unified@11

    View changes on GitHub

v0.10.2

28 Oct 02:31
0c1d1eb
Compare
Choose a tag to compare

   🐞 Bug Fixes

    View changes on GitHub

v0.10.1

01 Sep 10:25
Compare
Choose a tag to compare

   🚀 Features

   🐞 Bug Fixes

    View changes on GitHub

v0.10.0

24 Jun 04:48
5caa111
Compare
Choose a tag to compare

This release adds better defaults so you don’t need to specify any options or callback hooks.

Breaking Changes

  • Default theme is github-dark-dimmed, not Shiki’s default of nord.
  • .line class selector has been replaced with [data-line].
  • grid: true option has been added to prevent lines from collapsing by default with code blocks, allowing you to remove the onVisitLine callback hook.
  • keepBackground is now true by default.
  • onVisitHighlightedWord is now onVisitHighlightedChars.

Features

  • Highlighted lines now have data-highlighted-line attribute by default.
  • Highlighted chars now have data-highlighted-chars attribute by default.
  • Highlighted chars with id now have data-chars-id attribute by default.
  • onVisitTitle and onVisitCaption visitor hooks have been added.
    View changes on GitHub

v0.9.11

22 Jun 05:28
Compare
Choose a tag to compare

   🐞 Bug Fixes

    View changes on GitHub

v0.9.10

22 Jun 05:25
Compare
Choose a tag to compare

   🐞 Bug Fixes

    View changes on GitHub

v0.9.9

19 Jun 12:37
ec71d9c
Compare
Choose a tag to compare

   🚀 Features

  • Set up release process
  • Convert to TS
    View changes on GitHub