-
Notifications
You must be signed in to change notification settings - Fork 47
Section Hierarchy Must Be Linear
Heli Aldridge edited this page Feb 9, 2024
·
2 revisions
When writing reStructuredText, you must not reopen a parent section within a directive.
For example, the following is ill-defined:
=================
Top Level Section
=================
A Parent Section
----------------
.. tabs::
.. tab::
The Same Section Level
----------------------
The reason is that the section hierarchy is no longer necessarily be a tree: the parent section's parent, the Top Level section, is being added to from within a deeper level in the document tree and this is not a structure that reStructuredText currently supports.
However, directives may contain sections that are children of the current section level. For example:
A Parent Section
----------------
.. tabs::
.. tab::
A Child Section
~~~~~~~~~~~~~~~