Project

General

Profile

Actions

Feature #34764

open

Highlight single or multiple lines with rouge syntax highlighting

Added by Phil H. almost 4 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Text formatting
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:

Description

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

No data to display

Actions

Also available in: Atom PDF