From: Markus Armbruster <armbru@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-devel@nongnu.org
Subject: Re: [PATCH v5 12/20] qapi: Use rST markup for literal blocks
Date: Fri, 04 Sep 2020 15:02:15 +0200 [thread overview]
Message-ID: <87ft7x7l0o.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <20200810195019.25427-13-peter.maydell@linaro.org> (Peter Maydell's message of "Mon, 10 Aug 2020 20:50:11 +0100")
Peter Maydell <peter.maydell@linaro.org> writes:
> 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).
Has always been pretty broken, though: each line ends up in its own
@example environment. See doc-good.texi.
> 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 '::'.
Also, we should not reinvent what reST already provides.
> (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.)
In other words, the recent switch to the reST generator messed these
examples up, and this commit tidies up.
> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> 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 535b2b2e7bf..12758116e85 100644
> --- a/qapi/block-core.json
> +++ b/qapi/block-core.json
> @@ -566,13 +566,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
> ##
Could exploit that reST is the Perl of ASCII-based markups, and write
# 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
#
# Since: 4.0
##
Matter of taste. I find both similarly arcane.
> diff --git a/qapi/qapi-schema.json b/qapi/qapi-schema.json
> index 5fc0771eb04..c19b4267058 100644
> --- a/qapi/qapi-schema.json
> +++ b/qapi/qapi-schema.json
> @@ -23,8 +23,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.
Likewise.
Regardless::
Reviewed-by: Markus Armbruster <armbru@redhat.com>
next prev parent reply other threads:[~2020-09-04 13:03 UTC|newest]
Thread overview: 62+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-10 19:49 [PATCH v5 00/20] Convert QAPI doc comments to generate rST instead of texinfo Peter Maydell
2020-08-10 19:50 ` [PATCH v5 01/20] qapi/migration.json: Fix indentation Peter Maydell
2020-08-10 19:50 ` [PATCH v5 02/20] qapi: Fix indentation, again Peter Maydell
2020-08-14 18:39 ` Richard Henderson
2020-08-10 19:50 ` [PATCH v5 03/20] qapi/block-core.json: Fix nbd-server-start docs Peter Maydell
2020-08-14 18:39 ` Richard Henderson
2020-08-10 19:50 ` [PATCH v5 04/20] qapi/qapi-schema.json: Put headers in their own doc-comment blocks Peter Maydell
2020-08-10 19:50 ` [PATCH v5 05/20] qapi/machine.json: Escape a literal '*' in doc comment Peter Maydell
2020-08-10 19:50 ` [PATCH v5 06/20] tests/qapi/doc-good.json: Prepare for qapi-doc Sphinx extension Peter Maydell
2020-09-04 8:10 ` Markus Armbruster
2020-09-04 12:17 ` Peter Maydell
2020-08-10 19:50 ` [PATCH v5 07/20] scripts/qapi: Move doc-comment whitespace stripping to doc.py Peter Maydell
2020-08-10 19:50 ` [PATCH v5 08/20] scripts/qapi/parser.py: improve doc comment indent handling Peter Maydell
2020-09-04 9:03 ` Markus Armbruster
2020-09-21 15:06 ` Peter Maydell
2020-09-22 7:27 ` Markus Armbruster
2020-09-22 11:48 ` Peter Maydell
2020-09-22 14:08 ` Markus Armbruster
2020-09-22 15:28 ` Peter Maydell
2020-08-10 19:50 ` [PATCH v5 09/20] docs/sphinx: Add new qapi-doc Sphinx extension Peter Maydell
2020-08-14 18:40 ` Richard Henderson
2020-09-04 12:29 ` Markus Armbruster
2020-09-21 18:06 ` Peter Maydell
2020-09-22 11:42 ` Markus Armbruster
2020-09-24 13:25 ` Peter Maydell
2020-09-24 16:30 ` Peter Maydell
2020-09-25 5:51 ` Markus Armbruster
2020-09-04 14:44 ` Markus Armbruster
2020-09-04 14:52 ` Peter Maydell
2020-09-21 16:50 ` Peter Maydell
2020-09-22 11:47 ` Markus Armbruster
2020-08-10 19:50 ` [PATCH v5 10/20] docs/interop: Convert qemu-ga-ref to rST Peter Maydell
2020-09-04 13:16 ` Markus Armbruster
2020-09-04 13:18 ` Peter Maydell
2020-09-21 15:30 ` Peter Maydell
2020-09-22 12:00 ` Markus Armbruster
2020-09-22 12:58 ` Peter Maydell
2020-09-22 14:13 ` Markus Armbruster
2020-09-22 14:21 ` Peter Maydell
2020-09-22 14:42 ` Markus Armbruster
2020-08-10 19:50 ` [PATCH v5 11/20] docs/interop: Convert qemu-qmp-ref " Peter Maydell
2020-08-10 19:50 ` [PATCH v5 12/20] qapi: Use rST markup for literal blocks Peter Maydell
2020-09-04 13:02 ` Markus Armbruster [this message]
2020-08-10 19:50 ` [PATCH v5 13/20] qga/qapi-schema.json: Add some headings Peter Maydell
2020-08-10 19:50 ` [PATCH v5 14/20] scripts/qapi: Remove texinfo generation support Peter Maydell
2020-09-04 13:37 ` Markus Armbruster
2020-09-24 18:14 ` Peter Maydell
2020-09-25 6:48 ` Markus Armbruster
2020-08-10 19:50 ` [PATCH v5 15/20] docs/devel/qapi-code-gen.txt: Update to new rST backend conventions Peter Maydell
2020-09-17 9:24 ` Markus Armbruster
2020-08-10 19:50 ` [PATCH v5 16/20] Makefile: Remove redundant Texinfo related rules Peter Maydell
2020-08-10 19:50 ` [PATCH v5 17/20] scripts/texi2pod: Delete unused script Peter Maydell
2020-08-10 19:50 ` [PATCH v5 18/20] Remove Texinfo related files from .gitignore and git.orderfile Peter Maydell
2020-08-10 19:50 ` [PATCH v5 19/20] configure: Drop texinfo requirement Peter Maydell
2020-08-10 19:50 ` [PATCH v5 20/20] Remove texinfo dependency from docker and CI configs Peter Maydell
2020-08-27 11:25 ` [PATCH v5 00/20] Convert QAPI doc comments to generate rST instead of texinfo Peter Maydell
2020-09-04 14:34 ` Markus Armbruster
2020-09-04 14:48 ` Peter Maydell
2020-09-04 15:54 ` Markus Armbruster
2020-09-04 16:05 ` Peter Maydell
2020-09-24 14:13 ` Peter Maydell
2020-09-24 14:49 ` Markus Armbruster
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ft7x7l0o.fsf@dusky.pond.sub.org \
--to=armbru@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.