Issue with Markdown Rendering for Complex Code Snippets

Hello

While posting on the Gradle Forums; I have noticed that complex code snippets with nested structures / multiline blocks occasionally don’t render correctly using Markdown.

Indentation often appears inconsistent & certain characters (like backticks or braces) seem to interfere with the formatting, making the code harder to read. :innocent:
Reference : Formatting posts using markdown, BBCode, and HTML - Using Discourse - Discourse Meta Okta guide .

Would it be possible to improve the Markdown engine / introduce a dedicated code editor with syntax highlighting? :thinking: This change could enhance the readability of shared Gradle scripts and encourage more effective problem-solving discussions.

Thank you :blush:

If there are issues, they should probably be reported to Discourse. I doubt the Gradle folks can or will customize the code rendering themselves.

But actually, the only times I remember badly rendered code was, then users did not properly use the markup options but for example simply paste code in the content. Do you have examples where this is not the case?