[英]Sphinx Note Block in a list under a code block?
我有一个问题。 如果我想将注释块放在代码块下的列表中,它会包含在代码块中。 如果我取消缩进,清单编号将在注释后重新启动。 所以基本上,我需要的是:
Fixed list example
------------------
#. First do spam
#. Then do ``eggs``::
some_code_stuff()
.. note::
Nobody expects the Spanish Inquisistion
#. Then do spam and ``eggs``.
列表应在注释块之后以3继续。 但是目前, ..note
块只是被显示,就好像它是代码一样(由于之前的代码块)。 有任何想法吗?
与以下内容有关: 狮身人面像:在笔记部分后恢复列表编号
因此,有效的方法如下:
Fixed list example
------------------
#. First do spam
#. Then do ``eggs``:
.. code-block:: python
some_code_stuff()
.. note::
Nobody expects the Spanish Inquisistion
#. Then do spam and ``eggs``.
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.