markup/highlight: Add support to linkable line anchors on Chroma

Fixes #7622
This commit is contained in:
Fernando Jorge Mota
2020-09-13 06:00:16 -03:00
committed by GitHub
parent 748fd4cb0d
commit fb0f2cc718
3 changed files with 26 additions and 0 deletions

View File

@@ -43,6 +43,8 @@ Options:
* `linenos`: configure line numbers. Valid values are `true`, `false`, `table`, or `inline`. `false` will turn off line numbers if it's configured to be on in site config. {{< new-in "0.60.0" >}} `table` will give copy-and-paste friendly code blocks.
* `hl_lines`: lists a set of line numbers or line number ranges to be highlighted.
* `linenostart=199`: starts the line number count from 199.
* `anchorlinenos`: Configure anchors on line numbers. Valid values are `true` or `false`;
* `lineanchors`: Configure a prefix for the anchors on line numbers. Will be suffixed with `-`, so linking to the line number 1 with the option `lineanchors=prefix` adds the anchor `prefix-1` to the page.
### Example: Highlight Shortcode