A user, dmitry_fedyuk, is experiencing issues with syntax highlighting inside a list on Discourse. They have tried using three backticks and four spaces for indentation but are unable to get it to work. codinghorror suggests that this might be a limitation of Markdown and recommends testing it on GitHub or the CommonMark tester.
However, dmitry_fedyuk finds that it works on GitHub but not on Discourse. dmitry_fedyuk also tests their code on the CommonMark tester and finds that while it renders correctly, it does not highlight the code.
codinghorror asks if it works on the CommonMark tester, and dmitry_fedyuk confirms that it does. codinghorror notes that within a year, Discourse will switch to a CommonMark parser, which should resolve the issue.
Another user, riking, shares an example where syntax highlighting works inside a list using four spaces for indentation, but notes that it may not be relevant to the original issue.
Not sure that is possible, to get stuff in a list it must be indented. I suggest trying this on GitHub or the CommonMark tester.
Another difficulty is that this three backticks code block style is an addition to Markdown, although it is included in CommonMark, not all markdown flavors will support it.
My code from the first post works on CommonMark tester.
It is correctly idented (but not highlighted because as I see CommonMark does not highlight code at all).
So there is a clear difference: Discourse breaks my case №2 (3 back-ticks syntax) and CommonMark tester correctly renders it.