Actions
Feature #30429
openAutomatic language detection in syntax highlighting
Feature #30429:
Automatic language detection in syntax highlighting
Status:
New
Priority:
Normal
Assignee:
-
Category:
Text formatting
Target version:
-
Resolution:
Description
As of Redmine 4.0, you can use >100 languages in syntax highlighter (#24681). However, as you can use so many languages, it is difficult to memorize which languages you can highlight and what language name you should describe highlighting the snippet.
To resolve the problem, I propose a language name "auto". When you use the language name "auto" like the following, Redmine automatically detects the language and highlight the code snippet.

Probably we can use Rouge::Lexer.guess_by_source to implement this feature.
Files
Actions