Rouge syntax highlighter options on Kramdown fenced code-blocks

506 views Asked by At

When setting options for Rouge on fenced code blocks, the option gets ignored and has no effect, the HTML doesn't change:

``` html?line_numbers=true
<html></html>
```

I am using Jekyll, Kramdown and Rouge on GitHub Pages.

Is this supported - should it work?


My _config.yml:

kramdown:
  input: GFM
  syntax_highlighter: rouge
  syntax_highlighter_opts:
    default_lang: text
    span:
      default_lang: text
      line_numbers: false
    block:
      default_lang: text
      # line_numbers: false
      # start_line: 1
  • I've seen several blog posts where it supposedly working.
  • Also I am aware I could use {% highlight %} tags, but this is not an option.
  • I have tested several different options, not just line_numbers, also with colon instead of an equal sign, space between the language and the option, alot of combinations I could think of. Either they get ignored or break the fenced code blocks.
0

There are 0 answers