Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Swift highlighting in Confluence code macro?

Mike Rathwell
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.
June 7, 2018

I have been trying, to no avail, to add Swift to the list of languages in Confluence. I've looked for all variants I can FIND for the brush but none seem to "take" (Confluence 6.8.2)

Has anyone had success in recent times adding a brush to the code macro and, if so, what changes to default js files did they need to make?

All I get is that it's not a valid language file and consult the application logs. There is nothing in the logs. It just... fails.

 

1 answer

0 votes
Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 13, 2018

Hi Mike,

First of all, we have a feature request for this:

Secondly, there is a discussion on this thread that mentions capitalizing the brush. Have you tried this? 

Regards,

Shannon

Mike Rathwell
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.
June 13, 2018

I did NOT try that... I'll give that a shot... 

Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 14, 2018

Mike,

Thank you for letting me know! Do let us know how it goes. :) 

Shannon

Mike Rathwell
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.
June 15, 2018

Nope... no soap. Was a good thought but... <sigh>

The brush I am trying to add is this one https://github.com/syntaxhighlighter/brush-swift/blob/master/brush.js

Do I need to alter that (other than the capitalization?)

Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 18, 2018

Hi Mike,

I'm not familiar enough with javascript to know if that script needs any modifications, but it's worth trying.

I found this document on creating your own brushes, if you wanted to review it and give it a try. I found it referenced on this old question from Atlassian Answers.

Regards,

Shannon

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events