mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-27 04:13:53 -06:00
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 <jsnow@redhat.com> Message-ID: <20250311034303.75779-56-jsnow@redhat.com> Acked-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
This commit is contained in:
parent
5c1636f7cc
commit
c9b6f98803
1 changed files with 3 additions and 0 deletions
|
@ -303,6 +303,9 @@ class Transmogrifier:
|
|||
|
||||
# Add sections in source order:
|
||||
for section in sections:
|
||||
# @var is translated to ``var``:
|
||||
section.text = re.sub(r"@([\w-]+)", r"``\1``", section.text)
|
||||
|
||||
if section.kind == QAPIDoc.Kind.PLAIN:
|
||||
self.visit_paragraph(section)
|
||||
elif section.kind == QAPIDoc.Kind.MEMBER:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue