Öze*_* S. 3 python django python-sphinx
我有一个问题。如果我想将注释块放在代码块下的列表中,它就会包含在代码块中。如果我取消缩进,列表编号会在注释后重新开始。所以基本上,我需要的是:
Fixed list example
------------------
#. First do spam
#. Then do ``eggs``::
some_code_stuff()
.. note::
Nobody expects the Spanish Inquisistion
#. Then do spam and ``eggs``.
Run Code Online (Sandbox Code Playgroud)
该列表应在注释块之后以 3 继续。但目前,该..note块只是显示,就好像它是代码一样(由于之前的代码块)。有任何想法吗?
与以下内容有点相关:Sphinx:在注释部分后恢复列表编号
那么有效的方法如下:
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``.
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3145 次 |
| 最近记录: |