Sphinx: Resume list numbering after a note section

╄→гoц情女王★ 提交于 2019-11-29 09:35:44
ddbeck

The discontinuity of the list is caused by the note being a standalone element, not a child of the second numbered list element. To prevent the discontinuity of the list, start the note directive at the same indentation (in this case, 3 spaces) as the the text of the intended parent numbered list element. So instead of your sample reStructuredText, try this:

Fixed list example
------------------

#. First do spam
#. Then do ``eggs``

   .. note::

      Nobody expects the Spanish Inquisistion

#. Then do spam and ``eggs``.

This is one of those things about reStructuredText that's neither easy to spot, nor particularly well documented; see this question on nested lists for a closely-related problem.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!