I would like to insert code from a PLC programming language called Structured Text. I have enclosed the code using 3 back-quote characters and have specified Pascal as the language. The Structured Text language is similar to Pascal, so the highlighting works fairly well but is not perfect.
What I’m trying to do
I would like to take the Pascal definition file and modify it for Structured Text for my purposes and to submit it for inclusion in Obsidian or as an Obsidian plugin.
Thanks for the tip to use “iecst”. The one thing I notice is that Pascal and other languages are highlighted when in edit or auto preview mode. This only works when in read only mode. Perhaps this belongs on a list of things to fix somewhere.
I’m delighted that it works but it would be even better if it worked like other languages.
I can see that too that it doesn’t color iecst in live preview mode, but I’ve got no idea why it behaves like that. Not sure if that is an issue within Obsidian, or the backend library of prismJs.
@rigmarole , do you have any idea about this, and/or what is your suggestion for further investigation/reporting?
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.