Optionally use ultraviolet for syntax highlighting
ultraviolet (http://ultraviolet.rubyforge.org), by using TextMate's syntax files, is able to support many more languages than what the current syntax highlighting engine does. And it seems to remain in active development.
On the downside though, it comes with quite the heap of dependencies of which one, Oniguruma, requires native compiling.
So I guess the goal would be to keep both the current syntax highlighting engine intact, while optionally using ultraviolet if it's available.
This would bring redmine PHP syntax highlighting, for example.
I'll try and have a look into this - no promises though (/me is a rails noob).
#2 Updated by Philip Hofstetter about 12 years ago
agreed. It must be an option and I'm currently looking into making this happen.
Thanks for providing me with a pointer to the rmagick stuff as I was a bit puzzled about how to optionally require gems (ruby noob here, as stated in the original report). Now I know where to look :-)
#4 Updated by David Bronke over 11 years ago
Any progress on this? I just recently made some modifications to Larry Baltz's Markdown Formatter (our version can be found at http://new.development.g33xnexus.com/projects/show/redmine-markdown) to allow it to use a different Markdown parser library, but one of the big missing features of this formatter is code highlighting, and I'd love to be able to use something other than CodeRay. I'd be willing to hack at this, if anyone has some starting code I can look at.
#5 Updated by Philip Hofstetter over 11 years ago
I've had a definite look at this just last week. There are some issues associated with the UV stuff:
- The generated HTML uses CSS files which obviously must be available to the public. I'm not quite clear on how to cleanly integrate this into redmine
- Uv insists on having read access to the file in question to determine the hightlighter to use. Redmine's highlight-function doesn't have access to the actual file, but only the file name and the contents. So it would be needed to patch Uv to work with that (which obviously is enough).
I'm not fluent enough in ruby to make this work in a clean fashion that doesn't require patching Uv, so please, anybody else, go and do this :-)
#8 Updated by Go MAEDA almost 2 years ago
- Status changed from New to Closed
- Resolution set to Wont fix
The syntax highlighter has been replaced with Rouge in #24681 and it supports most popular languages.