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 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
**Bold text**
Preview:
Bold text
Italics
*Italicized text*
Preview:
Italicized text
Blockquote
> This is a quoted paragraph.
> The paragraph continues here.
Preview:
This is a quoted paragraph. The paragraph continues here.
Unordered List
* One
* Two
* Three
Preview:
- One
- Two
- Three
Code / Monospace
`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.
```python
def myfunc(x):
"""This is a docstring."""
return x
```
```pycon
>>> x = 2
>>> x + 3
5
```
```javascript
let foo = 23;
```
Preview:
def myfunc(x):
"""This is a docstring."""
return x
>>> x = 2
>>> x + 3
5
let foo = 23;
Horizontal Rule
---
Preview:
Link
[Link Title](https://realpython.com)
Preview:
Learn More About Markdown
To learn more about Markdown formatting, refer to the following resources: