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

Markus Armbruster posted 7 patches 6 months, 3 weeks ago
Maintainers: Markus Armbruster <armbru@redhat.com>, Michael Roth <michael.roth@amd.com>, Peter Maydell <peter.maydell@linaro.org>, Eric Blake <eblake@redhat.com>, Gerd Hoffmann <kraxel@redhat.com>, "Marc-André Lureau" <marcandre.lureau@redhat.com>, Kevin Wolf <kwolf@redhat.com>, Hanna Reitz <hreitz@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, "Gonglei (Arei)" <arei.gonglei@huawei.com>, Zhenwei Pi <pizhenwei@bytedance.com>, John Snow <jsnow@redhat.com>, Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>, Eduardo Habkost <eduardo@habkost.net>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Yanan Wang <wangyanan55@huawei.com>, Peter Xu <peterx@redhat.com>, Fabiano Rosas <farosas@suse.de>, Jason Wang <jasowang@redhat.com>, "Michael S. Tsirkin" <mst@redhat.com>, "Daniel P. Berrangé" <berrange@redhat.com>, Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru>, Jiri Pirko <jiri@resnulli.us>, Stefan Berger <stefanb@linux.vnet.ibm.com>, Stefan Hajnoczi <stefanha@redhat.com>, Mads Ynddal <mads@ynddal.dk>, Lukas Straub <lukasstraub2@web.de>, Konstantin Kostiuk <kkostiuk@redhat.com>
[PATCH 2/7] sphinx/qapidoc: Tweak "Since" section formatting WIP
Posted by Markus Armbruster 6 months, 3 weeks ago
---
 docs/sphinx/qapidoc.py         | 6 +++---
 tests/qapi-schema/doc-good.txt | 6 +-----
 2 files changed, 4 insertions(+), 8 deletions(-)

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)
-- 
2.44.0
Re: [PATCH 2/7] sphinx/qapidoc: Tweak "Since" section formatting WIP
Posted by Markus Armbruster 6 months, 3 weeks ago
Sent by accident, please ignore.