1744: Custom syntax highlighting format

stuart*******@gmai***** (Google Code) (Is this you? Claim this profile.)
July 30, 2010
What version are you running?
1.0.9

What's the URL of the page this enhancement relates to, if any?
Code review diff viewer

Describe the enhancement and the motivation for it.
Would it be possible to allow custom syntax highlighting in the code viewer? I've integrated Review Board with another dev system that uses a non-standard language, and I'd like to make sure the syntax is highlighted as per the dev environment.

This could be similar to how Notepad++ allows you to customise the style configurator.

This would allow Review Board to work for any language in any organisation.


What operating system are you using? What browser?
Windows 7 with Chrome 5, Firefox 3.6 & IE 8.

Please provide any additional information below.
david
#1 david
Implementing a custom formatter in pygments will let you do this.
  • +ThirdParty
#2 stuart*******@gmai***** (Google Code) (Is this you? Claim this profile.)
Unfortunately I'm not familiar with Pygments, so will have to skip over this one. Pity there isn't a user-configurable formatting option that would make it easier for the site admin to customise syntax highlighting.

Admittedly this probably wouldn't be a requirement for the majority of users.
chipx86
#3 chipx86
Defining a syntax highlighting grammar is a complicated task. You need a pretty thorough language to describe what things are highlighted when and where. That's not something that can really be done in an easy, user-configurable way. That's where Pygments comes in, since it provides a whole API for doing such a thing, but it does mean getting into the code and writing a lexer. It'd be nice if we could make it happen easily, but it's just not really an option.