Question

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?

Was it helpful?

Solution

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

- List item 1 
  ::

      code sample...
      code sample...

- List item 2 
  ::

      code sample...
      code sample...
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top