After some more digging I found this post:
The Hoon programming language, which has correct syntax highlighting in Obsidian, does not seem to have syntax highlighting when using live preview. Steps to reproduce type the following code with live preview (add 1 1) Expected result The syntax gets highlighted (“add” shows up in yellow) Actual result The syntax is not highlighted in live preview mode, I have to switch to reading mode.
In essence, it says that syntax highlighting in live preview is done by Codemirror 6, whilst syntax highlighting in the reader is done by primsJs. And they don’t necessarily support the same languages, and it’s not easy to get to them support the same languages.
So for syntax highlighting (for “iects”) to work in live preview, someone needs to extend the language support within Codemirror 6.