Project

General

Profile

Actions

Feature #30429

open

Automatic language detection in syntax highlighting

Added by Go MAEDA almost 6 years ago. Updated almost 6 years ago.

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

0%

Estimated time:
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

auto-keyword-textile.png (25.8 KB) auto-keyword-textile.png Go MAEDA, 2019-01-15 03:12
Actions

Also available in: Atom PDF