Create Code-Blocks Using Backticks in Discourse Threads

Discourse supports different type of backticks in posts. eg:

  • Single backticks for inline code: `inline code` rendered as: inline code
  • Triple backticks ``` (on line above and below) for code blocks, e.g.:
code block

But how can we show backicks as inline code – as I did with `inline code`?

We can use double backticks to show code which contains backticks

`` `inline code` `` 

To show ```
type `` ``` ``, and
To show `` ``` ``
type as follows:

 ` `` ``` `` ` 

We can also use indentation of 4 spaces or 1 tab to create code blocks.

So if a codeblock should show backticks it’s like this

```
code block
```
3 Likes