Markdown Formatting in the Real Python Comments Editor

Real Python’s comments editor supports Markdown formatting. Markdown is a lightweight markup language that uses plain text formatting elements to format words and phrases.

For example, to make a word bold you add two asterisks before and after it: this word is **bold** → this word is bold.

Markdown is popular with programmers and technical writers. At Real Python, we write all of our tutorials and books using Markdown formatting.

Here’s an overview of the Markdown syntax elements supported by Real Python’s comments feature:

Paragraphs

To create paragraphs, use a blank line to separate one or more lines of text.

Markdown Text
Markdown is great for formatting documents. This is a paragraph.

This is another paragraph, separated from the 
previous paragraph with a blank line.

Preview:

Markdown is great for formatting documents. This is a paragraph.

This is another paragraph, separated from the previous paragraph with a blank line.

Bold

Markdown Text
**Bold text**

Preview:

Bold text

Italics

Markdown Text
*Italicized text*

Preview:

Italicized text

Blockquote

Markdown Text
> This is a quoted paragraph.
> The paragraph continues here.

Preview:

This is a quoted paragraph. The paragraph continues here.

Unordered List

Markdown Text
* One
* Two
* Three

Preview:

  • One
  • Two
  • Three

Code / Monospace

Markdown Text
`Monospace text`

Preview:

Monospace text

Fenced Code Block

Fenced code blocks allow you to add syntax highlighting to blocks of text. They also retain whitespace and pre-made indentation. This makes them ideal for sharing code examples.

Markdown Text
```python
def myfunc(x):
    """This is a docstring."""
    return x
```

```pycon
>>> x = 2
>>> x + 3
5
```

```javascript
let foo = 23;
```

Preview:

Python
def myfunc(x):
    """This is a docstring."""
    return x
Python
>>> x = 2
>>> x + 3
5
JavaScript
let foo = 23;

Horizontal Rule

Markdown Text
---

Preview:


Markdown Text
[Link Title](https://realpython.com)

Preview:

Link Title

Learn More About Markdown

To learn more about Markdown formatting, refer to the following resources: