You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
qemu/docs/sphinx
John Snow 43e0d14ee0 docs/sphinx: fix extra stuff in TOC after freeform QMP sections
Freeform sections with titles are currently generating a TOC entry for
the first paragraph in the section after the header, which is not what
we want.

(Easiest to observe directly in the QMP reference manual's
"Introduction" section.)

When freeform sections are parsed, we create both a section header *and*
an empty, title-less section. This causes some problems with sphinx's
post-parse tree transforms, see also 2664f317 - this is a similar issue:
Sphinx doesn't like section-less titles and it also doesn't like
title-less sections.

Modify qapidoc.py to parse text directly into the preceding section
title as child nodes, eliminating the section duplication. This removes
the extra text from the TOC.

Only very, very lightly tested: "it looks right at a glance" ™️. I am
still in the process of rewriting qapidoc, so I didn't give it much
deeper thought.

Reported-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: John Snow <jsnow@redhat.com>
Message-ID: <20240822204803.1649762-1-jsnow@redhat.com>
3 months ago
..
dbusdoc.py docs/sphinx: add sphinx modules to include D-Bus documentation 3 years ago
dbusdomain.py meson: Pass -j option to sphinx 2 years ago
dbusparser.py docs/sphinx: add sphinx modules to include D-Bus documentation 3 years ago
depfile.py docs/sphinx/depfile.py: Handle env.doc2path() returning a Path not a str 4 months ago
fakedbusdoc.py meson: Pass -j option to sphinx 2 years ago
hxtool.py docs: remove Sphinx 1.x compatibility code 5 months ago
kerneldoc.py docs: remove Sphinx 1.x compatibility code 5 months ago
qapidoc.py docs/sphinx: fix extra stuff in TOC after freeform QMP sections 3 months ago
qmp_lexer.py meson: Pass -j option to sphinx 2 years ago