You can use triple-backticks to instantiate a code block here. Does the following accurately capture the kind of text you’re having trouble with in Obsidian?
I realised what the issue was… the issue is with the mermaid stateDiagram and the fact that it includes --> which ends the comment block early…
I can still leave the issue open as it would be nice to be able to comment the mermaid code block but I can see how this is such a narrow bug that it can be safely ignored…
Mods, feel free to close the request if deemed not worthy.