Syntax highlight changes

その他

このページの内容

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

In Stash 3.5 the mechanism for code highlighting has changed, HighlightJS has been replaced by CodeMirror and is no longer supported. Any custom languages you may have added will no longer work. If you have set up custom file extension or executable mappings for HighlightJS, these will need to migrated to the new format. The old format will stop working in Stash 4.0.

The new mappings are detailed in Configuring syntax highlighting for file extensions.

Migrating from the old mapping format to the new mapping format is relatively easy. For example, If you have old PERL mappings:

stash-config.properties
syntax.highlighter.perl.executables=perl
syntax.highlighter.perl.extensions=pl,pm

You just need to change the "perl" part of both the definitions to the MIME type "text/x-perl" so that it looks like:

stash-config.properties
syntax.highlighter.text/x-perl.executables=perl
syntax.highlighter.text/x-perl.extensions=pl,pm

After updating your stash-config.properties file you'll need to restart Stash for the configuration to take effect. See Stash config properties.

A full list of the supported modes in CodeMirror and their MIME types can be found in the CodeMirror repository. As of the time of writing, Stash uses CodeMirror 4.7.0, however we offer no stability guarantee, and may update CodeMirror versions in any release.

 

最終更新日: 2016 年 2 月 23 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.