qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/1] sphinx: qapidoc: Wrap "If" section body in a paragraph node
@ 2021-04-06 14:19 John Snow
  2021-04-06 14:19 ` [PATCH 1/1] " John Snow
  2021-04-07  9:41 ` [PATCH 0/1] " Markus Armbruster
  0 siblings, 2 replies; 6+ messages in thread
From: John Snow @ 2021-04-06 14:19 UTC (permalink / raw)
  To: qemu-devel; +Cc: Michael Roth, John Snow, Markus Armbruster, Peter Maydell

(See commit message.)

John Snow (1):
  sphinx: qapidoc: Wrap "If" section body in a paragraph node

 docs/sphinx/qapidoc.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

-- 
2.30.2




^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/1] sphinx: qapidoc: Wrap "If" section body in a paragraph node
  2021-04-06 14:19 [PATCH 0/1] sphinx: qapidoc: Wrap "If" section body in a paragraph node John Snow
@ 2021-04-06 14:19 ` John Snow
  2021-04-06 15:08   ` Peter Maydell
  2021-04-13  4:34   ` Markus Armbruster
  2021-04-07  9:41 ` [PATCH 0/1] " Markus Armbruster
  1 sibling, 2 replies; 6+ messages in thread
From: John Snow @ 2021-04-06 14:19 UTC (permalink / raw)
  To: qemu-devel; +Cc: Michael Roth, John Snow, Markus Armbruster, Peter Maydell

These sections need to be wrapped in a block-level element, such as
Paragraph in order for them to be rendered into Texinfo correctly.

Before (e.g.):

<section ids="qapidoc-713">
  <title>If</title>
  <literal>defined(CONFIG_REPLICATION)</literal>
</section>

became:

  .SS If
  \fBdefined(CONFIG_REPLICATION)\fP.SS \fBBlockdevOptionsReplication\fP (Object)
  ...


After:

<section ids="qapidoc-713">
  <title>If</title>
  <paragraph>
    <literal>defined(CONFIG_REPLICATION)</literal>
  </paragraph>
</section>

becomes:

  .SS If
  .sp
  \fBdefined(CONFIG_REPLICATION)\fP
  .SS \fBBlockdevOptionsReplication\fP (Object)
  ...


Reported-by: Markus Armbruster <armbru@redhat.com>
Tested-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: John Snow <jsnow@redhat.com>
---
 docs/sphinx/qapidoc.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/docs/sphinx/qapidoc.py b/docs/sphinx/qapidoc.py
index b7b86b5dff..b7a2d39c10 100644
--- a/docs/sphinx/qapidoc.py
+++ b/docs/sphinx/qapidoc.py
@@ -278,7 +278,9 @@ def _nodes_for_if_section(self, ifcond):
         nodelist = []
         if ifcond:
             snode = self._make_section('If')
-            snode += self._nodes_for_ifcond(ifcond, with_if=False)
+            snode += nodes.paragraph(
+                '', '', *self._nodes_for_ifcond(ifcond, with_if=False)
+            )
             nodelist.append(snode)
         return nodelist
 
-- 
2.30.2



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] sphinx: qapidoc: Wrap "If" section body in a paragraph node
  2021-04-06 14:19 ` [PATCH 1/1] " John Snow
@ 2021-04-06 15:08   ` Peter Maydell
  2021-04-13  4:34   ` Markus Armbruster
  1 sibling, 0 replies; 6+ messages in thread
From: Peter Maydell @ 2021-04-06 15:08 UTC (permalink / raw)
  To: John Snow; +Cc: Michael Roth, QEMU Developers, Markus Armbruster

On Tue, 6 Apr 2021 at 15:19, John Snow <jsnow@redhat.com> wrote:
>
> These sections need to be wrapped in a block-level element, such as
> Paragraph in order for them to be rendered into Texinfo correctly.
>
> Before (e.g.):
>
> <section ids="qapidoc-713">
>   <title>If</title>
>   <literal>defined(CONFIG_REPLICATION)</literal>
> </section>
>
> became:
>
>   .SS If
>   \fBdefined(CONFIG_REPLICATION)\fP.SS \fBBlockdevOptionsReplication\fP (Object)
>   ...
>
>
> After:
>
> <section ids="qapidoc-713">
>   <title>If</title>
>   <paragraph>
>     <literal>defined(CONFIG_REPLICATION)</literal>
>   </paragraph>
> </section>
>
> becomes:
>
>   .SS If
>   .sp
>   \fBdefined(CONFIG_REPLICATION)\fP
>   .SS \fBBlockdevOptionsReplication\fP (Object)
>   ...
>
>
> Reported-by: Markus Armbruster <armbru@redhat.com>
> Tested-by: Markus Armbruster <armbru@redhat.com>
> Signed-off-by: John Snow <jsnow@redhat.com>

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

It's a shame Sphinx doesn't diagnose this kind of mis-constructed
document tree.

thanks
-- PMM


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/1] sphinx: qapidoc: Wrap "If" section body in a paragraph node
  2021-04-06 14:19 [PATCH 0/1] sphinx: qapidoc: Wrap "If" section body in a paragraph node John Snow
  2021-04-06 14:19 ` [PATCH 1/1] " John Snow
@ 2021-04-07  9:41 ` Markus Armbruster
  2021-04-13  9:16   ` Peter Maydell
  1 sibling, 1 reply; 6+ messages in thread
From: Markus Armbruster @ 2021-04-07  9:41 UTC (permalink / raw)
  To: John Snow; +Cc: Michael Roth, qemu-devel, Peter Maydell

Peter, do you intend to merge this yourself?  I have nothing else queued
right now.  If you want me to do a pull request for this patch, let me
know.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] sphinx: qapidoc: Wrap "If" section body in a paragraph node
  2021-04-06 14:19 ` [PATCH 1/1] " John Snow
  2021-04-06 15:08   ` Peter Maydell
@ 2021-04-13  4:34   ` Markus Armbruster
  1 sibling, 0 replies; 6+ messages in thread
From: Markus Armbruster @ 2021-04-13  4:34 UTC (permalink / raw)
  To: John Snow; +Cc: Michael Roth, qemu-devel, Peter Maydell

John Snow <jsnow@redhat.com> writes:

> These sections need to be wrapped in a block-level element, such as
> Paragraph in order for them to be rendered into Texinfo correctly.

Into man, not into Texinfo.

[...]



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/1] sphinx: qapidoc: Wrap "If" section body in a paragraph node
  2021-04-07  9:41 ` [PATCH 0/1] " Markus Armbruster
@ 2021-04-13  9:16   ` Peter Maydell
  0 siblings, 0 replies; 6+ messages in thread
From: Peter Maydell @ 2021-04-13  9:16 UTC (permalink / raw)
  To: Markus Armbruster; +Cc: Michael Roth, John Snow, QEMU Developers

On Wed, 7 Apr 2021 at 10:41, Markus Armbruster <armbru@redhat.com> wrote:
>
> Peter, do you intend to merge this yourself?  I have nothing else queued
> right now.  If you want me to do a pull request for this patch, let me
> know.

I missed this email earlier. I had assumed somebody else would pick it up,
but as it happens I have a couple of last minute patches I want to send
out anyway, so I'll pick this up now.

thanks
-- PMM


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-04-13  9:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-06 14:19 [PATCH 0/1] sphinx: qapidoc: Wrap "If" section body in a paragraph node John Snow
2021-04-06 14:19 ` [PATCH 1/1] " John Snow
2021-04-06 15:08   ` Peter Maydell
2021-04-13  4:34   ` Markus Armbruster
2021-04-07  9:41 ` [PATCH 0/1] " Markus Armbruster
2021-04-13  9:16   ` Peter Maydell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).