28

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?

ustun
  • 6,941
  • 5
  • 44
  • 57

1 Answers1

38

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

- List item 1 
  ::

      code sample...
      code sample...

- List item 2 
  ::

      code sample...
      code sample...
alexmuller
  • 2,207
  • 3
  • 23
  • 36
S.Lott
  • 384,516
  • 81
  • 508
  • 779