mirror of https://github.com/zulip/zulip.git
34 lines
512 B
Markdown
34 lines
512 B
Markdown
### 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](/static/images/help/markdown-code.png)
|
|
|
|
!!! tip ""
|
|
|
|
A widget in the top right corner of code blocks allows you to easily
|
|
copy code to your clipboard.
|