开发者

Source Code in Bullet Lists with reStructuredText

开发者 https://www.devze.com 2023-01-26 02:25 出处:网络
I am trying to include source code in bullet lists with reStructuredText; like this: - List item 1 :: code sample...

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: W开发者_运维百科ARNING/2 Literal block expected; none found.

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


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

- List item 1 
  ::

      code sample...
      code sample...

- List item 2 
  ::

      code sample...
      code sample...
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号