Vote #81265
未完了Highlight single or multiple lines with rouge syntax highlighting
ステータス:
New
優先度:
通常
担当者:
-
カテゴリ:
Text formatting_26
対象バージョン:
-
開始日:
2022/05/09
期日:
進捗率:
0%
予定工数:
Redmineorg_URL:
category_id:
26
version_id:
0
issue_org_id:
34764
author_id:
505288
assigned_to_id:
0
comments:
0
status_id:
1
tracker_id:
2
plus1:
0
affected_version:
closed_on:
affected_version_id:
説明
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
いいね!0