Project

General

Profile

Smarter Repository Syntax Highlighting

Added by Colin Sheaff almost 12 years ago

We manage several Drupal projects via Redmine and Drupal conventions do not often use .php as a file extension, so syntax highlighting doesn't engage by default in the repository view. I could edit vendor/plugins/coderay-0.7.6.227/lib/coderay/helpers/file_type.rb to set .module or .inc to parse as PHP but better by far to simply do a "shebang-like" scan of the first line of the file to see if it leads with <?php. Or if a file starts as HTML and includes inline PHP (many templates do this) it would be better to be more dynamic in how the code is recognized.

It's not clear if Ultraviolet does this, but regardless, does anyone know of any Redmine-compatible syntax highlighters that would be helpful? Either by being intrinsically smart, or by allowing additional custom file-type defaults through Redmine itself?