Literal code blocks ...
Wol <[email protected]> Mon, 21 Feb 2022 20:20:19 +0000
| Newsgroups | gmane.text.docutils.user |
|---|---|
| Message-ID | <[email protected]> |
Literal blocks
Literal code blocks (ref) are introduced by ending a paragraph with the
special marker ::. The literal block must be indented (and, like all
paragraphs, separated from the surrounding ones by blank lines):
This is a normal text paragraph. The next paragraph is a code sample::
It is not processed in any way, except
that the indentation is removed.
It can span multiple lines.
This is a normal text paragraph again.
The handling of the :: marker is smart:
-------------------------------------------------------------------------
That's basically copied straight out of the documentation. So why, when
I declare a code block, has it been formatted?
If it's not processed in any way, why have I got colour-highlighting,
and bold text? Dunno what else it'll do ...
Or is trying to use Sphinx to write documentation just an exercise in
frustration? Okay, it has printed it cleanly in a fixed-width font, but
it certainly doesn't appear to have done what the documentation says it
does!
Cheers,
Wol