Could you note use the Text Core Component, create a "Code" paragraph style in the Policy (that wraps with the <code>), and then have your favorite JS-based code highlighter target `.cmp_text code` ? https://docs.adobe.com/content/help/en/experience-manager-core-components/using/components/text.html