I've been looking for a while now, without finding what I want. That's why I'm asking you.
I've tried
| text
| again
but it doesn't keep the space at the beginning, so I cant do that :
| text
| text
| text
Same problem with ::
So I'm looking for the equivalent of <pre>
in HTML. Thx for help
Literal blocks in ReStructuredText either need to be indented or quoted.
You're using the indented form, and in the specification we can see how the issue arises:
Indented literal blocks are indicated by indentation relative to the surrounding text (leading whitespace on each line). The minimum indentation will be removed from each line of an indented literal block.
Try using the quoted style instead. For example, if you use
> text
> again
then the whitespace will be kept, but of course this means that you do need to add the >
character to the start of each line --- as far as I am aware there is no direct equivalent to the HTML <pre>
tag in which the markup is completely left alone.