3

I've got a problem. If I want to put a note block in a list under a code block, it gets included in the code block. If I unindent it, the listing number restart after the note. So basically, what I need is:

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

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

   some_code_stuff()

   .. note::

      Nobody expects the Spanish Inquisistion

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

The List should continue with 3 after the note block. But currently, the ..note block is just displayed, as if it was code (due to the code block before). Any ideas?

A bit related to: Sphinx: Resume list numbering after a note section

Community
  • 1
  • 1
Özer
  • 2,059
  • 18
  • 22
  • 1
    I cannot reproduce the exact problem in the question. The numbering and the display of the note is OK, but the code block is not formatted properly. If that line is indented, everything works for me. – mzjn Feb 20 '17 at 14:39

1 Answers1

5

So what works is the following:

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``.
Özer
  • 2,059
  • 18
  • 22