Forums

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

How do I get the right syntax highlighting for diff Code Block Macro?

Kit.Paulson
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 18, 2023

When I add a Code Block Macro and set the language to "Diff", I expect the syntax highlighting to make lines that begin with '-' red, and lines that begin with '+' green. Instead, lines that begin with '-' are green and lines that begin with '+' are dark blue.

Example (I tried a few variants just to see if it would make a difference):

Screenshot 2023-07-18 123045.png

Is there a way to fix this (or a workaround) to get the correct formatting, which should be:

Screenshot 2023-07-18 124156.png

1 answer

1 accepted

0 votes
Answer accepted
Dan Breyen
Community Champion
July 18, 2023

Hi @Kit.Paulson welcome to the community!  It's not clear from your message if you're using Confluence Server or Confluence Cloud.  If you're using Confluence Cloud, it appears that Atlassian has reworked their page editor to now have a Code Snippet Macro.  My cloud instance has the Code Snippet, and I'm unable to recreate your issue on my site.  I'm wondering if you're using the older editor and it's causing the problem.

Hope that helps.

Kit.Paulson
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 18, 2023

Thanks for your feedback! It looks like I was using the old editor; when I preview my page in the new editor the colouring is correct. I'll switch to the new editor going forward.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
atlassian, confluence, loom, atlassian intelligence, ai notes, ai-powered meeting notes, atlassian community events, ace, confluence ai, loom ai integration, ai note-taking, atlassian ai features, team '25, atlassian live learning, confluence automation

Unlock AI-powered meeting notes: Join our live learning session! 📹

Did you catch the news at Team ‘25? With Loom, Confluence, Atlassian Intelligence, & even Jira 👀, you won’t have to worry about taking meeting notes again… unless you want to. Join us to explore the beta & discover a new way to boost meeting productivity.

Register today!
AUG Leaders

Atlassian Community Events