[go: up one dir, main page]

Menu

Commit [r10200]  Maximize  Restore  History

Fix error/crash whith Sphinx "autoprogram" [bugs:#509].

Sphinx's "autoprogram" fails to parse docstrings containing a section header.

"autoprogram" starts nested parsing with empty `memo.title_styles` and a
`<section>` as root node. In this context, the "root section" should be
considered a "level 0" section.
Remove the unattached "root section" from the list of `parent_sections` so that
appending a new top-level section to `parent_sections[0].parent` works.

milde 2025-08-11

changed /trunk/docutils/docutils/parsers/rst/states.py