4 ms·
You can do code blocks:: like this :)
by forsaken 11y ago
You can do code blocks::
like this
:)
- danielvf 11y agoYeah - 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.
- cname 11y agoIt'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).