In pre-3.5 Stash if I wanted to add new extensions to the syntax highlighter, I had to redefine the entire list of extensions (instead of just listing the additional types), like this:
#Add syntax highlighting for misc. XML files (from wsdl onwards), REMOVE ONCE STASH VERSION IS >= 3.5.0 syntax.highlighter.xml.extensions=xml,html,htm,shtml,shtm,jsp,jspf,tag,jspx,dtd,xsd,xsl,xslt,wsdl,msbuild,props,csproj,vcxproj,config,ism,settings,vcproj,proj,shfbproj,targets,fsproj,filters
The part from xml to xslt was the default value, which I found somewhere then but cannot find now.
On this page, or any of the pages linked from here, I cannot find information about whether the new syntax highlighter engine needs to be configured the same way (redefining the whole list) or by only defining the additional extensions. Which one is it?
In case I need to redefine the whole list, where can I find the current default values?
PS.: On the page I mentioned above, the link in the sentence "Configuration for Stash 3.4 and below can be found here." is probably not the one it should be.
Hey @Balazs Szakmary
In Stash 3.5 you now only need to add the extra extensions you want you no longer need to include all the defaults.
Please also be aware that we are changing how we reference highlighters, we are now using mime types rather than names like "xml" it would now be "application/xml"
In your case the full line will be:
syntax.highlighter.application/xml.extensions=shtml,shtm,jsp,jspf,tag,jspx,dtd,xslt,wsdl,msbuild,props,csproj,vcxproj,config,ism,settings,vcproj,proj,shfbproj,targets,fsproj,filters
Also thanks for the info about the broken doc links, I'll try and get that fixed up.
[Link works now.] One more question: can I have multiple lines in the config for one mime type or does it have to be one long line?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Haven't tested, but you might try http://stackoverflow.com/questions/8975908/how-to-write-multiple-line-property-value-using-propertiesconfiguration That is, backslash as the last character to "escape" the newline and keep it out of the resulting value.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That is good to know too, but I meant multiple entries in the config file starting with "syntax.highlighter.application/xml.extensions="
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I don't believe that would work (but feel free to try it and see). I don't think we have any code for joining multiple of the same property name and I don't think Java properties support that in the first place.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.