github rehype-pretty/rehype-pretty-code v0.10.0

latest releases: rehype-pretty-code@0.14.1, rehype-pretty-code@0.14.0, @rehype-pretty/transformers@0.13.2...
2 years ago

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

Don't miss a new rehype-pretty-code release

NewReleases is sending notifications on new releases.