Skip to content

Commit c9b6f98

Browse files
jnsnowMarkus Armbruster
authored andcommitted
docs/qapidoc: process @foo into foo
Add support for the special QAPI doc syntax to process @references as ``preformatted text``. At the moment, there are no actual cross-references for individual members, so there is nothing to link against. For now, process it identically to how we did in the old qapidoc system. Signed-off-by: John Snow <[email protected]> Message-ID: <[email protected]> Acked-by: Markus Armbruster <[email protected]> Signed-off-by: Markus Armbruster <[email protected]>
1 parent 5c1636f commit c9b6f98

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

docs/sphinx/qapidoc.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,9 @@ def visit_sections(self, ent: QAPISchemaDefinition) -> None:
303303

304304
# Add sections in source order:
305305
for section in sections:
306+
# @var is translated to ``var``:
307+
section.text = re.sub(r"@([\w-]+)", r"``\1``", section.text)
308+
306309
if section.kind == QAPIDoc.Kind.PLAIN:
307310
self.visit_paragraph(section)
308311
elif section.kind == QAPIDoc.Kind.MEMBER:

0 commit comments

Comments
 (0)