We recently switched to using the ADF renderer component for some of our macro bodies, which enables built-in Confluence macros to render when nested in our macros like they do normally on a page. This has worked well for some macros, but not for others - one that has a particularly bad issue is the Code macro.
It seems like there is some kind of race condition in the Code macro itself where sometimes it will render as expected:
But sometimes it will render broken:
Would appreciate if perhaps someone from the atlaskit / ADF team could provide some pointers on what is happening here.