How to display language syntax using DAV SVN module?

When viewing a plain text code file (for example, ".py", ".c", ".cpp", ".m", ".as", ".js", etc.) can the DAV SVN module display language specific syntax coloring?

That would be awesome. Currently, this is just black text, but it would be great if it worked, to make it easier to read the code in the browser, for those who need it, you just need quick access to svn for the browser, without requiring opening the code in the IDE or a graphical editor, such as Notepad ++.

+4
source share
3 answers

I do not believe DAV SVN will do it myself. The best he can do is submit documents with the correct Content-Type headers. You can convert XSLT to directory lists, but that doesn't help much.

I'm afraid you will have to switch to a heavier weight viewer if you want a good result. One option is websvn + enscript.

+3
source

If apache is already running, try websvn with Colorisation from file lists and many other features.

+1
source

For PHP, I do this by adding the application / type as the php source to the location directive.

<Location /dav> ... # Your dav settings AddType application/x-httpd-php-source .php #ForceType text/plain ## You should not use this if you want code coloring </Location> 
0
source

All Articles