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?
Community moderators have prevented the ability to post new answers.
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!
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you Brian, this change seems to have done the trick!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.