Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Source Code in Bullet Lists with reStructuredText

I am trying to include source code in bullet lists with reStructuredText; like this:

- List item 1 ::    code sample...   code sample...  - List item 2 ::    code sample...   code sample... 

However, I get the following warning: System Message: WARNING/2 Literal block expected; none found.

The empty lines in the list are indented by a single space. Any ideas?

like image 450
ustun Avatar asked Nov 17 '10 16:11

ustun


People also ask

How do I comment a line in an RST file?

For comments, add 2 periods .. followed by a newline and then your comment indented.

What is Sphinx rst?

RST is a powerful and straightforward markup language that, in combination with Sphinx, provides a wide range of facilities for intelligent and appealing documentation creation. It uses simple and implicit syntax to introduce a variety of content elements such as titles, code blocks, vertical lists, and many others.


1 Answers

You haven't indented enough. Think of it this way.

- List item 1    ::        code sample...       code sample...  - List item 2    ::        code sample...       code sample... 
like image 187
S.Lott Avatar answered Oct 10 '22 00:10

S.Lott