Please allow triple-backtick for code blocks
 

It would be nice if triple-backticks could be use to enclose code blocks, as an alternative to indenting by four spaces.

Ideally, these triple-backticks could be followed by some language to indicate the desired syntax highlighting.

For example one could input:

```python
def square(x):
    r"""
    Return the square of the input.
    """
    return x*x
```

and see it rendered as

def square(x):
    r"""
    Return the square of the input.
    """
    return x*x

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
slelievre's avatar
196
slelievre
asked 1 year ago
Evgeny's avatar
13.2k
Evgeny
updated 1 year ago

Comments

see more comments