Enable Java syntax highlight in SourceForge's hgweb
I would like to have syntax highlighting in hgweb.
For example, makes
http://jstock.hg.sourceforge.net/hgweb/jstock/jstock/file/7289237e7b67/src/org/yccheok/jstock/gui/AboutJ开发者_StackOverflowDialog.java
looks like
http://jstock.cvs.sourceforge.net/viewvc/jstock/jstock/src/org/yccheok/jstock/gui/AboutJDialog.java?revision=1.36&view=markup
May I know how I can do so? I saw
https://sourceforge.net/apps/trac/sourceforge/wiki/Mercurial%20Web%20repository%20browser mentions Viewing the contents of a checked-in file (including raw or syntax-highlighted outputs).
.
May I know how?
you can enable the syntax-highlighting via mime-type setting. I have done this with svn via setting the svn property svn:mime-type for files: xml to text/xml java to text/x-java
Next check in the files and the syntax should be highlighted.
For other scm tools please check there manual, how to set the mime-type for check in.
I hope it is helpful to you.
精彩评论