Did custom syntax highlighting break between 5.1 and 5.6?

Mark Stramaglia February 26, 2015

I have a custom brush for a language that we use at work (PeopleCode), which I installed into my Confluence 5.1 environment running Code Macro 2.1.4.  In that environment, my custom language is working great.

We are getting ready to do an upgrade, and I just tested the same custom brush in a Confluence 5.6 environment, also running Code Macro version 2.1.4.  In the 5.6 environment, I can install the brush, but when I use it in a Code Block, I'm getting the following error:

SyntaxHighlighter Can't find brush for: peoplecode

Any thoughts as to what might be the cause?  I'd suspect an issue with the brush JS file, except that it worked fine in my 5.1 environment.

Is anybody else successfully using custom Code Macro languages in Confluence 5.6 or better?

5 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Answer accepted
Brian
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 26, 2015

Hey there Mark,

I was able to use your language file in my Code Macro (v.2.1.5) by modifying the following line in the file:

Change:

typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;

To:

SyntaxHighlighter = SyntaxHighlighter || (typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null);

Hope this helps!

 

0 votes
Mark Stramaglia May 15, 2016

Hi Brett,

We just upgraded our Confluence environment to 5.9.10, and it does look like it is broken again.  I'll let you know if we figure anything out - I'm opening a ticket with Atlassian Support since it worked in 5.7 and now is broken in 5.9.

0 votes
Brett Ryan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 9, 2016

Is this broken again? Using 5.9.6 and getting the same issue. First I thought it was my language file, tried yours and get the same issue "Can't find brush for : peoplecode", driving me nuts.

0 votes
Mark Stramaglia February 27, 2015

Thank you Brian, this change seems to have done the trick!

 

0 votes
Mark Stramaglia February 26, 2015

If anybody wants to give it a try, my custom brush JS file can be downloaded off of GitHub: [https://github.com/markstramaglia/peoplecode-syntaxhighlighter-brush]

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events