Apitronix
Apitronix

Reputation: 273

How to force end of some admonitions in a RST file

I have a note in a reStructuredText formatted text that will be placed between a point of a list, and its sublist. The problem is that the note include the sublist.


Here is an extract of the file:

3. Select build parameters on the `CI              
   <https://website.com/CI>`_ and run it on your
   remote  branch.
 
.. note::

   The text of the note.

   a. If the failure is not related to your changes, say so in the pull request
      comments.
   b. Then, make the appropriate fixes.

 4. Wait for comments or approval. If modifications are requested by the
    comments, consider implementing them.

When I compile it, a. and b. are included into the note. But I don't want that. Is there a way to force the note to end after The text of the note. ?

Upvotes: 0

Views: 237

Answers (3)

sinoroc
sinoroc

Reputation: 22295

This answer is wrong. See the comments for why. See Steve Piercy's answer for a correct one.


Probably something like the following:

3. Select build parameters on the `CI
   <https://website.com/CI>`_ and run it on your
   remote  branch.

.. note::

   The text of the note.

..

   a. If the failure is not related to your changes, say so in the pull request
      comments.
   b. Then, make the appropriate fixes.

4. Wait for comments or approval. If modifications are requested by the
comments, consider implementing them.

Upvotes: 0

Steve Piercy
Steve Piercy

Reputation: 15055

Whitespace has meaning in reStructuredText. You need to indent appropriately. Also for nested lists, a blank line is necessary when the nesting level changes.

3.  Select build parameters on the `CI <https://website.com/CI>`_ and run it on your remote branch.

    .. note::

        The text of the note.

    a.  If the failure is not related to your changes, say so in the pull request comments.
    b.  Then, make the appropriate fixes.

4.  Wait for comments or approval. If modifications are requested by the comments, consider implementing them.

Note that I indent 4 spaces and do not use line breaks within a sentence. Docs are not code, and do not need to be wrapped.

Upvotes: 2

Apitronix
Apitronix

Reputation: 273

The problem could be an indentation problem.

If the note is related to the 3. point, this answer seems to be good.

Else, if the note is related to a sublist element, you need to indent one more time the note.

3. Select build parameters on the `CI
   <https://website.com/CI>`_ and run it on your
   remote  branch.

   .. note::

      The text of the note.

   a. If the failure is not related to your changes, say so in the pull request
      comments.
   b. Then, make the appropriate fixes.

4. Wait for comments or approval. If modifications are requested by the
   comments, consider implementing them.

Upvotes: 1

Related Questions