Support alternative fenced code block syntaxes
I run a coding community Discord server, so code sharing code snippets is common. Sometimes those code snippets are of Markdown code, which can be tricky.
Thankfully Discord already supports escaping backtics using the double-backtick syntax.
However it seems that the only way to share code blocks in Discord is with the 3-backtick syntax, which makes it impossible to share Markdown code that includes nested fenced code blocks.
This is typically possible by using an alternative fenced code block syntax for the actual code block, such as tildes (~~~) or 4+ backticks/tildes instead of 3. For example:

-
Escaping the backticks in
<pre>blocks also doesn't work:```
\`\`\`
test
\`\`\`
```produces
\`\`\`
test
\`\`\`I also disagree with the feature that an inline code span surrounded with three backticks should automatically produce a preformatted text block. In other words, typing
```test```should still produce an inline code span, unless the beginning and ending delimiters are on seperate lines.1 -
Yeah...
That is kinda stupid because the "markdown" from Discord is not a "real" markdown, it's anything "self parsing" thing!Best way is to make Codes on a "Real" Syntax Highlighting Editor like and just screenshot it until (even if) Discord can Handle real Code Blocks!
0
Please sign in to leave a comment.
Comments
2 comments