How to configure the new (3.5+) syntax highlighter of Stash?

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

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.

1 answer

1 accepted

0 votes
Accepted answer

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:


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?

Adam Ahmed Atlassian Team Jan 13, 2015

Haven't tested, but you might try That is, backslash as the last character to "escape" the newline and keep it out of the resulting value.

That is good to know too, but I meant multiple entries in the config file starting with "syntax.highlighter.application/xml.extensions="

Adam Ahmed Atlassian Team Jan 14, 2015

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.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 06, 2018 in Bitbucket

Upgrade Best Practices

Hello! My name is Mark Askew and I am a Premier Support Engineer for products Bitbucket Server/Data Center, Fisheye & Crucible. Today, I want to bring the discussion that Jennifer, Matt, and ...

678 views 5 9
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you