qapi: Make section headings start a new doc comment block
commitdcdc07a97cbe57369d75077c9d3ea035f8c5f483
authorMarkus Armbruster <armbru@redhat.com>
Fri, 20 Mar 2020 09:18:05 +0000 (20 10:18 +0100)
committerMarkus Armbruster <armbru@redhat.com>
Mon, 7 Sep 2020 14:35:16 +0000 (7 16:35 +0200)
tree5702b708a7785f51979248a823a8b3fcee3196b1
parentd98884b75df3676f94d93fbaf6372ca705dc2aee
qapi: Make section headings start a new doc comment block

Our current QAPI doc-comment markup allows section headers (introduced
with a leading '=' or '==') anywhere in a free-form documentation
comment.  This works for Texinfo because the generator simply prints a
Texinfo section command at that point in the output stream.  For rST
generation, since we're assembling a tree of docutils nodes, this is
awkward because a new section implies starting a new section node at
the top level of the tree and generating text into there.

Make section headers start a new free-form documentation block, so the
future rST document generator doesn't have to look at every line in
free-form blocks and handle headings in odd places.

This change makes no difference to the generated Texinfo.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20200320091805.5585-3-armbru@redhat.com>
scripts/qapi/parser.py
tests/qapi-schema/doc-good.out