It turns out our code macro has a title parameter, so we can trivially import the title from the Confluence code macro.