zulip/help/include/code-blocks-examples.md

512 B

What you type

Inline code span: `let x = 5`

Code block:
```
def f(x):
   return x+1
```

Syntax highlighting:
```python
def fib(n):
    # TODO: base case
    return fib(n-1) + fib(n-2)
```

!!! tip ""

You can also use `~~~` to start code blocks, or just indent the code 4 or more
spaces.

What it looks like

Markdown code

!!! tip ""

A widget in the top right corner of code blocks allows you to easily
copy code to your clipboard.