qapi/parser: don't parse rST markup as section headers
commit65fa48c79f20a37c7204f9e43dd7cc3058aa066c
authorJohn Snow <jsnow@redhat.com>
Wed, 26 Jun 2024 22:21:19 +0000 (26 18:21 -0400)
committerMarkus Armbruster <armbru@redhat.com>
Sat, 6 Jul 2024 06:58:24 +0000 (6 08:58 +0200)
treeeed31f99f53b7addba40c780bdebe51acff872a1
parent543ff13a20663b9aa93a4531fc75a1ebe7c69269
qapi/parser: don't parse rST markup as section headers

The double-colon synax is rST formatting that precedes a literal code
block. We do not want to capture these as QAPI-specific sections.

Coerce blocks that start with e.g. "Example::" to be parsed as untagged
paragraphs instead of special tagged sections.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-ID: <20240626222128.406106-14-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
[Indentation tweaked for consistency]
Signed-off-by: Markus Armbruster <armbru@redhat.com>
scripts/qapi/parser.py
tests/qapi-schema/doc-good.json
tests/qapi-schema/doc-good.out
tests/qapi-schema/doc-good.txt