diff mbox series

[2/7] sphinx/qapidoc: Tweak "Since" section formatting WIP

Message ID 20240506110254.3965097-5-armbru@redhat.com (mailing list archive)
State New, archived
Headers show
Series [PULL,1/7] qapi: New QAPISchemaBranches, QAPISchemaAlternatives | expand

Commit Message

Markus Armbruster May 6, 2024, 11:02 a.m. UTC
---
 docs/sphinx/qapidoc.py         | 6 +++---
 tests/qapi-schema/doc-good.txt | 6 +-----
 2 files changed, 4 insertions(+), 8 deletions(-)

Comments

Markus Armbruster May 6, 2024, 12:45 p.m. UTC | #1
Sent by accident, please ignore.
diff mbox series

Patch

diff --git a/docs/sphinx/qapidoc.py b/docs/sphinx/qapidoc.py
index ac81003f0e..f19f5ded78 100644
--- a/docs/sphinx/qapidoc.py
+++ b/docs/sphinx/qapidoc.py
@@ -252,9 +252,9 @@  def _nodes_for_features(self, doc):
 
     def _nodes_for_since(self, doc):
         if doc.since:
-            section = self._make_section('Since')
-            self._parse_text_into_node(doc.since.text, section)
-            return [section]
+            # TODO emphasis
+            return [nodes.paragraph(
+                '', '', nodes.Text('Since: ' + doc.since.text))]
         return []
 
     def _nodes_for_example(self, exampletext):
diff --git a/tests/qapi-schema/doc-good.txt b/tests/qapi-schema/doc-good.txt
index 847db70412..56d50d4992 100644
--- a/tests/qapi-schema/doc-good.txt
+++ b/tests/qapi-schema/doc-good.txt
@@ -235,11 +235,7 @@  Examples
    - *verbatim*
    - {braces}
 
-
-Since
-~~~~~
-
-2.10
+Since: 2.10
 
 
 "cmd-boxed" (Command)