diff options
author | John Snow <jsnow@redhat.com> | 2025-03-10 23:42:43 -0400 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2025-03-11 10:10:57 +0100 |
commit | e9fbf1a0c6c2df9c53bb577b4245cf48914687fe (patch) | |
tree | 4b31485dcd7cc7c4be812dc3bfa6eca597abaf7a /docs | |
parent | 56e1adf293037ec3324a7f20d54d50cd671dc281 (diff) | |
download | qemu-e9fbf1a0c6c2df9c53bb577b4245cf48914687fe.zip qemu-e9fbf1a0c6c2df9c53bb577b4245cf48914687fe.tar.gz qemu-e9fbf1a0c6c2df9c53bb577b4245cf48914687fe.tar.bz2 |
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>
Diffstat (limited to 'docs')
-rw-r--r-- | docs/sphinx/qapidoc.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/docs/sphinx/qapidoc.py b/docs/sphinx/qapidoc.py index a9f98d4..c17cb9f 100644 --- a/docs/sphinx/qapidoc.py +++ b/docs/sphinx/qapidoc.py @@ -139,6 +139,12 @@ class Transmogrifier: self.add_lines(section.text, section.info) 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: """ Generate option lines for QAPI entity directives. |