summary refs log tree commit diff stats
path: root/docs/sphinx/qapidoc.py
diff options
context:
space:
mode:
authorJohn Snow <jsnow@redhat.com>2025-02-23 22:37:37 -0500
committerMarkus Armbruster <armbru@redhat.com>2025-03-04 07:11:06 +0100
commit5e4c466e6ad7d79ef5492b13deb110bb5e90d7c0 (patch)
tree236dd1972f62dd85da959f55b6933ce2c33537d9 /docs/sphinx/qapidoc.py
parentb61a4eb3f32ce74c5ffe001806f9e786788a546f (diff)
downloadfocaccia-qemu-5e4c466e6ad7d79ef5492b13deb110bb5e90d7c0.tar.gz
focaccia-qemu-5e4c466e6ad7d79ef5492b13deb110bb5e90d7c0.zip
docs/qapidoc: remove example section support
Since commit 3c5f6114 (qapi: remove "Example" doc section), Example
sections no longer exist, so this support in qapidoc is now dead code.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-ID: <20250224033741.222749-7-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'docs/sphinx/qapidoc.py')
-rw-r--r--docs/sphinx/qapidoc.py9
1 files changed, 1 insertions, 8 deletions
diff --git a/docs/sphinx/qapidoc.py b/docs/sphinx/qapidoc.py
index 5a4d7388b2..61997fd21a 100644
--- a/docs/sphinx/qapidoc.py
+++ b/docs/sphinx/qapidoc.py
@@ -254,10 +254,6 @@ class QAPISchemaGenRSTVisitor(QAPISchemaVisitor):
         section += dlnode
         return [section]
 
-    def _nodes_for_example(self, exampletext):
-        """Return list of doctree nodes for a code example snippet"""
-        return [nodes.literal_block(exampletext, exampletext)]
-
     def _nodes_for_sections(self, doc):
         """Return list of doctree nodes for additional sections"""
         nodelist = []
@@ -275,10 +271,7 @@ class QAPISchemaGenRSTVisitor(QAPISchemaVisitor):
                 continue
 
             snode = self._make_section(section.tag)
-            if section.tag.startswith('Example'):
-                snode += self._nodes_for_example(dedent(section.text))
-            else:
-                self._parse_text_into_node(dedent(section.text), snode)
+            self._parse_text_into_node(dedent(section.text), snode)
             nodelist.append(snode)
         return nodelist