rehype-pretty-code

Beautiful code blocks for Markdown or MDX.

MIT License

Downloads
651.8K
Stars
1K
Committers
30

Bot releases are visible (Hide)

rehype-pretty-code - [email protected]

Published by github-actions[bot] about 2 months ago

Minor Changes

  • Adds an option to bypass inline code blocks (#233) - thanks @superhighfives!
rehype-pretty-code - @rehype-pretty/[email protected] Latest Release

Published by github-actions[bot] 5 months ago

Patch Changes

  • fix: smarter way to modify rounded in presence of title (#205)
  • fix: prevent start line numbers being highlighted (#181)
  • feat: introduce new package @rehype-pretty/transformers. Release the first transformer: @rehype-pretty/transformers/copy-button (see example usage)
rehype-pretty-code - [email protected]

Published by github-actions[bot] 5 months ago

Patch Changes

  • fix: smarter way to modify rounded in presence of title (#205)
  • fix: prevent start line numbers being highlighted (#181)
  • feat: introduce new package @rehype-pretty/transformers. Release the first transformer: @rehype-pretty/transformers/copy-button (see example usage)
rehype-pretty-code - v0.13.1

Published by github-actions[bot] 7 months ago

   🐞 Bug Fixes

    View changes on GitHub
rehype-pretty-code - v0.13.0

Published by github-actions[bot] 9 months ago

   🚀 Features

  • Upgrade to shiki v1
npm uninstall shikiji
npm install shiki

   🐞 Bug Fixes

    View changes on GitHub
rehype-pretty-code - v0.12.6

Published by github-actions[bot] 9 months ago

   🚀 Features

   🐞 Bug Fixes

    View changes on GitHub
rehype-pretty-code - v0.12.5

Published by github-actions[bot] 9 months ago

   🐞 Bug Fixes

    View changes on GitHub
rehype-pretty-code - v0.12.4

Published by github-actions[bot] 9 months ago

   🐞 Bug Fixes

    View changes on GitHub
rehype-pretty-code - v0.12.3

Published by github-actions[bot] 10 months ago

   🐞 Bug Fixes

    View changes on GitHub
rehype-pretty-code - v0.12.2

Published by github-actions[bot] 10 months ago

   🚀 Features

    View changes on GitHub
rehype-pretty-code - v0.12.1

Published by github-actions[bot] 11 months ago

   🚀 Features

   🐞 Bug Fixes

    View changes on GitHub
rehype-pretty-code - v0.12.0

Published by github-actions[bot] 11 months ago

   🚀 Features

Migrate to Shikiji  -  by @atomiks and Dimitri POSTOLOV in https://github.com/atomiks/rehype-pretty-code/issues/109 (b6823)

npm i rehype-pretty-code@latest [email protected] && 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
rehype-pretty-code - v0.11.0

Published by github-actions[bot] 11 months ago

   🐞 Bug Fixes

Upgrades to unified@11

    View changes on GitHub
rehype-pretty-code - v0.10.2

Published by github-actions[bot] 12 months ago

   🐞 Bug Fixes

    View changes on GitHub
rehype-pretty-code - v0.10.1

Published by github-actions[bot] about 1 year ago

   🚀 Features

   🐞 Bug Fixes

    View changes on GitHub
rehype-pretty-code - v0.10.0

Published by atomiks over 1 year 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
rehype-pretty-code - v0.9.11

Published by github-actions[bot] over 1 year ago

   🐞 Bug Fixes

    View changes on GitHub
rehype-pretty-code - v0.9.10

Published by github-actions[bot] over 1 year ago

   🐞 Bug Fixes

  • VisitableElement import  -  by @atomiks (10f55)
  • Unified in bundle  -  by @atomiks (64c85)
  • build: Resolve .js ext  -  by @atomiks (1841c)
    View changes on GitHub
rehype-pretty-code - v0.9.9

Published by github-actions[bot] over 1 year ago

   🚀 Features

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