1

Is there a way to enable start_inline by default for all code blocks in Rouge?

I'm writing a blog using Jekyll 3 (rouge, kramdown) and I have a lot of PHP code blocks. I'd like syntax highlighting to work without having to replace all the ```php tags into ```php?start_inline=1

Matthieu Napoli
  • 48,448
  • 45
  • 173
  • 261

1 Answers1

0
kramdown:
  syntax_highlighter: rouge
  syntax_highlighter_opts: # Rouge Options › https://github.com/jneen/rouge#full-options
    css_class: highlight
    # default_lang: console
    span:
      line_numbers: false
    block:
      line_numbers: true
      start_line: 1
MetaPod
  • 15
  • 6
  • 1
    Thank you for contributing an answer. Would you kindly edit your answer to include an explanation of your code? That will help future readers better understand what is going on, and especially those members of the community who are new to the language and struggling to understand the concepts. – Jeremy Caney Nov 16 '21 at 00:45