All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: "Marc-André Lureau" <marcandre.lureau@redhat.com>
Cc: qemu-devel@nongnu.org, peter.maydell@linaro.org
Subject: Re: [Qemu-devel] [PATCH] qapi2texi: replace quotation by bold section name
Date: Mon, 20 Feb 2017 14:08:15 +0100	[thread overview]
Message-ID: <87poid103k.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <20170217093416.27688-1-marcandre.lureau@redhat.com> ("Marc-André Lureau"'s message of "Fri, 17 Feb 2017 13:34:16 +0400")

Marc-André Lureau <marcandre.lureau@redhat.com> writes:

> When we build qemu-qmp-ref.txt this causes texinfo to complain several
> times:
> "Negative repeat count does nothing at
> /usr/share/texinfo/Texinfo/Convert/Line.pm line 124."
>
> It also doesn't display correctly, because the "Notes" text disappears
> entirely in the HTML version because it thinks there's no actual
> quotation text.
>
> The text file output formatting is also not good.
>
> To solve those problems, remove usage of @quotation, and simply use bold
> face for the section name.
>
> Reported-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>  scripts/qapi2texi.py | 10 ++++------
>  1 file changed, 4 insertions(+), 6 deletions(-)
>
> diff --git a/scripts/qapi2texi.py b/scripts/qapi2texi.py
> index 83ded95c2d..c1071c62c6 100755
> --- a/scripts/qapi2texi.py
> +++ b/scripts/qapi2texi.py
> @@ -159,12 +159,10 @@ def texi_body(doc):
>              func = texi_example
>  
>          if name:
> -            # FIXME the indentation produced by @quotation in .txt and
> -            # .html output is confusing
> -            body += "\n@quotation %s\n%s\n@end quotation" % \
> -                    (name, func(doc))
> -        else:
> -            body += func(doc)
> +            # prefer @b over @strong, so txt doesn't translate it to *Foo:*
> +            body += "\n\n@b{%s:}\n" % name

The second newline is sometimes needed to make a paragraph, and at other
times it's redundant and somewhat ugly.  Tolerable, as this file isn't
for humans.

> +
> +        body += func(doc)
>  
>      return body

Reviewed-by: Markus Armbruster <armbru@redhat.com>

      reply	other threads:[~2017-02-20 13:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-17  9:34 [Qemu-devel] [PATCH] qapi2texi: replace quotation by bold section name Marc-André Lureau
2017-02-20 13:08 ` Markus Armbruster [this message]

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=87poid103k.fsf@dusky.pond.sub.org \
    --to=armbru@redhat.com \
    --cc=marcandre.lureau@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.