Create Code-Blocks Using Backticks in Discourse Threads

Discourse supports different type of backticks in posts. eg:

Inline Code

Single backticks for inline code: `inline code` rendered as: inline code

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

We can use double backticks to show code which contains backticks

`` `inline code` `` 

To show ```
type `` ``` ``, and

To show `` ``` ``
type as follows:

 ` `` ``` `` ` 

Block Code

Triple backticks ``` (on line above and below) for code blocks, e.g.:

```
code block
```

Renders as:

code block

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