[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 26/29] qapi: Use rST markup for literal blocks
From: |
Peter Maydell |
Subject: |
[PATCH 26/29] qapi: Use rST markup for literal blocks |
Date: |
Thu, 6 Feb 2020 17:30:37 +0000 |
There are exactly two places in our json doc comments where we
use the markup accepted by the texi doc generator where a '|' in
the first line of a doc comment means the line should be emitted
as a literal block (fixed-width font, whitespace preserved).
Since we use this syntax so rarely, instead of making the rST
generator support it, instead just convert the two uses to
rST-format literal blocks, which are indented and introduced
with '::'.
(The rST generator doesn't complain about the old style syntax,
it just emits it with the '|' and with the whitespace not
preserved, which looks odd, but means we can safely leave this
change until after we've stopped generating texinfo.)
Signed-off-by: Peter Maydell <address@hidden>
---
qapi/block-core.json | 16 +++++++++-------
qapi/qapi-schema.json | 6 ++++--
2 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/qapi/block-core.json b/qapi/block-core.json
index 092cd8f13d9..ea0371c33fb 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -550,13 +550,15 @@
# For the example above, @bins may be something like [3, 1, 5, 2],
# and corresponding histogram looks like:
#
-# | 5| *
-# | 4| *
-# | 3| * *
-# | 2| * * *
-# | 1| * * * *
-# | +------------------
-# | 10 50 100
+# ::
+#
+# 5| *
+# 4| *
+# 3| * *
+# 2| * * *
+# 1| * * * *
+# +------------------
+# 10 50 100
#
# Since: 4.0
##
diff --git a/qapi/qapi-schema.json b/qapi/qapi-schema.json
index f7ba60a5d0b..1d3fb573846 100644
--- a/qapi/qapi-schema.json
+++ b/qapi/qapi-schema.json
@@ -22,8 +22,10 @@
#
# Example:
#
-# | -> data issued by the Client
-# | <- Server data response
+# ::
+#
+# -> data issued by the Client
+# <- Server data response
#
# Please, refer to the QMP specification (docs/interop/qmp-spec.txt) for
# detailed information on the Server command and response formats.
--
2.20.1
- Re: [PATCH 16/29] qapi/{block, misc, tmp}.json: Use explicit bulleted lists, (continued)
[PATCH 09/29] qapi: Fix indent level on doc comments in json files, Peter Maydell, 2020/02/06
[PATCH 27/29] qga/qapi-schema.json: Add some headings, Peter Maydell, 2020/02/06
[PATCH 22/29] scripts/qapi/parser.py: improve doc comment indent handling, Peter Maydell, 2020/02/06
[PATCH 26/29] qapi: Use rST markup for literal blocks,
Peter Maydell <=
[PATCH 24/29] docs/interop: Convert qemu-ga-ref to rST, Peter Maydell, 2020/02/06
[PATCH 23/29] docs/sphinx: Add new qapi-doc Sphinx extension, Peter Maydell, 2020/02/06
[PATCH 25/29] docs/interop: Convert qemu-qmp-ref to rST, Peter Maydell, 2020/02/06
[PATCH 28/29] scripts/qapi: Remove texinfo generation support, Peter Maydell, 2020/02/06
[PATCH 29/29] docs/devel/qapi-code-gen.txt: Update to new rST backend conventions, Peter Maydell, 2020/02/06
Re: [PATCH 00/29] Convert QAPI doc comments to generate rST instead of texinfo, Peter Maydell, 2020/02/06
Re: [PATCH 00/29] Convert QAPI doc comments to generate rST instead of texinfo, no-reply, 2020/02/06
Re: [PATCH 00/29] Convert QAPI doc comments to generate rST instead of texinfo, no-reply, 2020/02/06
Re: [PATCH 00/29] Convert QAPI doc comments to generate rST instead of texinfo, Markus Armbruster, 2020/02/07