Enable Java syntax highlight in SourceForge's hgweb
-
09-10-2019 - |
Question
I would like to have syntax highlighting in hgweb.
For example, makes
looks like
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?
Solution
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.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow