Feature #1313
closed
Optionally use ultraviolet for syntax highlighting
Added by Philip Hofstetter over 16 years ago.
Updated about 6 years ago.
Description
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).
Could be interesting for the high number of matching language. It should be integrated as an option, as rmagick, since it has a dependency.
Thank you for pointing it out.
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 :-)
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 :-)
- % Done changed from 0 to 100
I just whipped up an Ultraviolet plugin for Redmine: http://github.com/epitron/redmine_ultraviolet
It works great so far!
If anyone wants to add a configuration screen that lets you pick the colour theme, I'd be very happy. :D
- Related to Feature #24681: Syntax highlighter: replace CodeRay with Rouge added
- Status changed from New to Closed
- Resolution set to Wont fix
Also available in: Atom
PDF