[go: up one dir, main page]

Menu

Commit [r10203]  Maximize  Restore  History

Look for valid parent before appending a section element.

Don't append a `<section>` to an `<admonition>` or other body element,
only to <section>` and `<document>`.
Exception: the base node of a nested parser may become the
new section's parent, if it has no parent (detached node).
It is up to the users (or extension implementing a directive) to
prevent or handle these cases.

milde 2025-08-15

changed /trunk/docutils/HISTORY.rst
changed /trunk/docutils/docutils/parsers/rst/states.py
changed /trunk/docutils/test/test_parsers/test_rst/test_misc.py