Feature #34764

Highlight single or multiple lines with rouge syntax highlighting

Added by Phil H. over 1 year ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:-% Done:


Category:Text formatting
Target version:-


Syntax highlighting in redmine only supports one parameter class="{language}".

Rouge actually has additional parameters to controle e.g. the highlighting of single or multiple lines.

Source: https://github.com/rouge-ruby/rouge#formatters

Rouge::Formatters::HTMLLineHighlighter.new(formatter, highlight_lines: [3, 5]) will split your code into lines and wrap the lines specified by the highlight_lines option in a span with a class name specified by the highlight_line_class option (default: hll).

Can the redmine be extended to support these parameters?
Best regards

Also available in: Atom PDF