* [Qemu-devel] [PATCH] qapi2texi: replace quotation by bold section name
@ 2017-02-17 9:34 Marc-André Lureau
2017-02-20 13:08 ` Markus Armbruster
0 siblings, 1 reply; 2+ messages in thread
From: Marc-André Lureau @ 2017-02-17 9:34 UTC (permalink / raw)
To: qemu-devel; +Cc: peter.maydell, armbru, Marc-André Lureau
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
+
+ body += func(doc)
return body
--
2.11.0.295.gd7dffce1c.dirty
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [Qemu-devel] [PATCH] qapi2texi: replace quotation by bold section name
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
0 siblings, 0 replies; 2+ messages in thread
From: Markus Armbruster @ 2017-02-20 13:08 UTC (permalink / raw)
To: Marc-André Lureau; +Cc: qemu-devel, peter.maydell
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>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-02-20 13:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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.