mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-27 04:13:53 -06:00
docs/qapidoc: add visit_errors() method
Notably, this method does not currently address the formatting issues present with the "errors" section in QAPIDoc and just vomits the text verbatim into the rST doc, with somewhat inconsistent results. To be addressed in a future patch. Signed-off-by: John Snow <jsnow@redhat.com> Message-ID: <20250311034303.75779-46-jsnow@redhat.com> Acked-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
This commit is contained in:
parent
56e1adf293
commit
e9fbf1a0c6
1 changed files with 6 additions and 0 deletions
|
@ -139,6 +139,12 @@ class Transmogrifier:
|
||||||
self.add_lines(section.text, section.info)
|
self.add_lines(section.text, section.info)
|
||||||
self.ensure_blank_line()
|
self.ensure_blank_line()
|
||||||
|
|
||||||
|
def visit_errors(self, section: QAPIDoc.Section) -> None:
|
||||||
|
# FIXME: the formatting for errors may be inconsistent and may
|
||||||
|
# or may not require different newline placement to ensure
|
||||||
|
# proper rendering as a nested list.
|
||||||
|
self.add_lines(f":error:\n{section.text}", section.info)
|
||||||
|
|
||||||
def preamble(self, ent: QAPISchemaDefinition) -> None:
|
def preamble(self, ent: QAPISchemaDefinition) -> None:
|
||||||
"""
|
"""
|
||||||
Generate option lines for QAPI entity directives.
|
Generate option lines for QAPI entity directives.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue