Skip to content

[Bug]: Specific Admonitions do not include text immediately following the directive indicator in the admonition content #1285

@richardkrikler

Description

@richardkrikler

Summary

reStructuredText Directives should allow any text immediately following the directive indicator (on the same line and/or indented on following lines) to be rendered in the body of the admonition.

Trying in an online reStructuredText Live Preview renderer, the text will be rendered:
Image

Test-rendering via phpDocumentor/guides in docs/index.rst results in missing text:
Image

This especially relevant when the only content of an admonition is located in the same line of the directive indicator. Then it looks like this:
Image

The closed issue #301 describes this behaviour as implemented:

For all admonitions, the text directly following the directive is considered the first paragraph of a directive

Code snippet that reproduces the problem

.. note:: This is a note admonition.
   This is the second line of the first paragraph.

   - The note contains all indented body elements
     following.
   - It includes this bullet list.

.. note:: This is a note admonition.
vendor/bin/guides

Expected output

The text "This is a note admonition." should be rendered before "This is the second line of the first paragraph.".

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions