📘 mdbook line numbers

Heya, I've created a js snippet so line numbers show up in mdbook code blocks:

image

image

Currently I use it with additional-js, but if you want to make it permanent, perhaps help work on a permanent solution in mdBook#1303.

Tested:

  • :white_check_mark: code copy button

  • :white_check_mark: copy using Ctrl C

  • :white_check_mark: hidden lines

  • :white_check_mark: theming (through doc/theme/highlight.css):

    image

enjoy :v:

7 Likes