Re:Don’t Use Markdown for Documentation
by forsaken on Tuesday March 15, 2016 @07:09PM
(#11293754)
You can do code blocks::
:)
[ Parent
| on HN ]
Yeah - this always trips me up too, since it's two colons, not the holy Python single colon, and it's "magic" on the preceding paragraph, not the code itself. Django docs written in RST avoid doing this style.
You can do anything you need to in RST, but there's just more friction involved.
It's not a Python thing, though. It's a reStructuredText thing. I don't see how this syntax is more "magic" than, say, using # in Markdown to indicate a heading.
The reason it's a double colon is because a single colon acts like a normal single colon (i.e., it's not interpreted in any way), which is sometimes what you want (i.e., not every indented block is a code block).