Skip to main content

Slack supports markdown rendering (https://docs.slack.dev/reference/block-kit/blocks/markdown-block) which is great! I noticed recently that it even handles syntax highlighted code blocks rendering, which is another great enhancement. But while using this block for message rendering, it does not handle indented code blocks (specifically by 4 spaces ;)), which is an issue, because it completely breaks the message.    Is that a known bug? I played around with some workarounds. I can dedent the codeblocks with no problem, but then the rest of a message is still indented and renders as an auto code block.. etc. Fixing something basically offsets something different. Indented code blocks are valid markdown so I don't understand what is the issue.    I would appreciate if this is not a good place to discuss this, where should i reach out?    Thanks in advance!    #Slack Developers    #Slack Community

6 answers
  1. Mar 14, 1:09 PM

    Slack’s markdown block currently does not fully support indented code blocks (4 spaces), even though they are valid in standard Markdown. It mainly supports triple backtick code blocks instead. If you want to report or discuss it, you can raise it in the Slack Developer Community or Slack API support channels.

0/9000