Open ebrahim opened 13 years ago
Reported the issue to upstream: http://www.redmine.org/issues/8120
I got syntax highlighting to work by modifying lib/redmine_ckeditor/wiki_formatting/formatter.rb as follows:
def initialize(text)
@text = text.gsub(/<code\s+class="(\w+)">\s*(.+?)<\/code>/m) do
"<code class=\"#{$1} syntaxhl\">" +
Redmine::SyntaxHighlighting.highlight_by_language($2, $1) +
"</code>"
end
end
Currently entering something like following code snippets doesn't produce syntax-highlighted output:
Ruby example:
C++ example: