Code snippets in Include Macro have ugly surrounding effects

David Schor August 17, 2021

When using the Include macro from a source page with code snippets, the target page displays the code snippets with ugly surrounding effects. These effects do not exist in the source.

Is there a way to eliminate these effects? 

Thank you very much!

ConfluenceIncludeMacroCodeSnippetIssue.png

2 answers

0 votes
Bojun Lin March 10, 2022

This is still not fixed? ...

0 votes
Jessica
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 19, 2021

Hi David,

Hope you're doing well! Welcome to the Atlassian Community. :D

While checking the behavior you mentioned about the code snippet macro, I could notice not only the surroundings were different, but the whole "box".

It seems the content there is not being rendered correctly from the new editor to another page, because the Include page macro is not being able to maintain the same styling from the new editor and is show the legacy editor format instead, as seen on this bug:

Also, the code macro is not displaying the same styling, as it happens with the example you provided when it is used inside another macro, which is the case of using it to show on another page using the include page macro:


At this moment, we don't have a workaround for this bug, so our recommendation, for now, would be to copy the Code snippet/macro and inserting it directly on the page instead.

I hope this helps to clarify why this is happening on your page with the macro.

If there is anything else we can help with or clarify, please let us know!

Kindest Regards,
Jessica

David Schor August 19, 2021

Hi Jessica, thank you for responding. copying and pasting the snippet directly is unsatisfactory. The purpose for using the "Include" macro is reuse of the same material multiple times in the knowledge base while maintaining one source for it. The pages include 1-3 code snippets in various locations on the pages. Copying and pasting the snippets outside the macro removes context most of the time, and may again result in the need to update a snippet multiple times.

Please don't rest on this workaround.

Thank you,

David

Jessica
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 19, 2021

Thank you for your reply, @David Schor

Yeah, at this moment we don't have a valid workaround and we understand completely how annoying it could be, as the styling is not matching the one from the source page there.

That would be a suggestion just in case you really would need it to look exactly as it was on the source page since we don't have a valid workaround for the include page macro.

We're sorry that you have run into this bug. For now, we don't have an official ETA for a fix for this one, but we highly recommend adding yourself as a watcher of the report, to receive the updates on the same.

Thank you again for your honest feedback, David.

Kindest Regards,
Jessica

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events