プロジェクト

全般

プロフィール

Vote #81265

未完了

Highlight single or multiple lines with rouge syntax highlighting

Admin Redmine さんが約2年前に追加. 約2年前に更新.

ステータス:
New
優先度:
通常
担当者:
-
カテゴリ:
Text formatting_26
対象バージョン:
-
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
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:
ステータス-->[New]

説明

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

Admin Redmine さんが約2年前に更新

  • カテゴリText formatting_26 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0