Continuing the discussion from Formatting AQL in new topics:
@ian.mcnicoll @thomas.beale Please feel free to move this topic if AQL isn’t the right place. @siljelb asked if this is possible - as far as I am aware yes it is, but we would need a HLJS-compliant syntax highlighter to be written for AQL/ADL. This isn’t an area of my expertise really, but perhaps someone within the OpenEHR community would be able to do it.
Discourse uses Highlight.js (HLJS) in the frontend JS code to highlight code snippets. From my enquiries with the Discourse team over on Meta, it is possible to extend the default/built-in syntax highlighters with additional languages via a Theme Component in Discourse.
Relevant reading on Discourse Meta about this
Once we have a HLJS highlighter for AQL/ADL I suspect it is not going to be too hard to do. I’m happy to help once the AQL/ADL highlighter is done.
Change highlight.js styles? - support - Discourse Meta
Here is a repository in which both the HLJS and Discourse plugin have been done for another language Jai GitHub - Jai-Community/discourse-highlightjs-jai: Discourse theme component to highlight Jai syntax