我有一个问题。如果我想将注释块放在代码块下的列表中,它就会包含在代码块中。如果我取消缩进,列表编号会在注释后重新开始。所以基本上,我需要的是:
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
块只是显示,就好像它是代码一样(由于之前的代码块)。有任何想法吗?
有点相关:Sphinx:在注释部分后恢复列表编号 https://stackoverflow.com/questions/29354305/sphinx-resume-list-numbering-after-a-note-section/29371701?noredirect=1#comment71811765_29371701
那么有效的方法如下:
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``.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)