プロジェクト

全般

プロフィール

Vote #81011

完了

Add a list of supported languages by the code highlighter to the help

Admin Redmine さんが3年以上前に追加. 3年以上前に更新.

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

0%

予定工数:
category_id:
24
version_id:
155
issue_org_id:
33859
author_id:
259873
assigned_to_id:
332
comments:
6
status_id:
5
tracker_id:
2
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

It's useful to be able to see the languages that syntax highlighting supports in your static files so you don't have to switch to an external site(https://redmine.org/projects/redmine/wiki/RedmineCodeHighlightingLanguages) every time.
Also, having a list of supported languages as an html file is useful when different Redmine versions support different languages.

I would like to see a list of languages by clicking the links in the reference as below.
!{width: 50%; border: 1px solid #ccc}ScreenShot_2020-08-17_15.09.34.png!
!{width: 50%; border: 1px solid #ccc}ScreenShot_2020-08-17_15.09.47.png!


journals

The attached patch is a sample that adds a link to the English reference only.
The content of languages_supported_by_syntax_highlighting.html is English, and it is difficult to make the description of the supported language in it multilingual.

Since languages_supported_by_syntax_highlighting.html is useful for checking the distinguished name of a language even if it is in English, I think you can link to languages_supported_by_syntax_highlighting.html from other language references.
--------------------------------------------------------------------------------
Updated the patch:

* Updated for the current trunk (r21213)
* Updated help files for all languages
* Slightly changed HTML markup
* Changed the file name shorter and consistent with [[RedmineCodeHighlightingLanguages]]

--------------------------------------------------------------------------------
Setting the target version to 5.0.0.
--------------------------------------------------------------------------------
Committed the changes. Thank you for your contribution.
--------------------------------------------------------------------------------
Escaped HTML special characters inside <td> in r21401. The following is the one-liner that I used to generate the updated HTML.

<pre>
bin/rails r 'Rouge::Lexer.all.sort_by(&:tag).each {|lexer| desc = String.new("#{lexer.desc}"); desc << " [aliases: #{lexer.aliases.join(%q|,|)}]" if lexer.aliases.any? ; puts "<tr>\n <td>#{lexer.tag}</td>\n <td>#{CGI.escapeHTML(desc)}</td>\n</tr>"}'
</pre>
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------


related_issues

relates,New,36594,Relax rouge version dependency in Gemfile

Admin Redmine さんが3年以上前に更新

  • カテゴリDocumentation_24 にセット
  • 対象バージョン5.0.0_155 にセット

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

いいね!0
いいね!0