From 2d18b4ca023ca1a3aee18064251d6e6e1084f3eb Mon Sep 17 00:00:00 2001
From: John Snow
Date: Tue, 6 Apr 2021 10:19:09 -0400
Subject: sphinx: qapidoc: Wrap "If" section body in a paragraph node
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.):
If
defined(CONFIG_REPLICATION)
became:
.SS If
\fBdefined(CONFIG_REPLICATION)\fP.SS \fBBlockdevOptionsReplication\fP (Object)
...
After:
If
defined(CONFIG_REPLICATION)
becomes:
.SS If
.sp
\fBdefined(CONFIG_REPLICATION)\fP
.SS \fBBlockdevOptionsReplication\fP (Object)
...
Reported-by: Markus Armbruster
Tested-by: Markus Armbruster
Signed-off-by: John Snow
Reviewed-by: Peter Maydell
Message-id: 20210406141909.1992225-2-jsnow@redhat.com
Signed-off-by: Peter Maydell
---
docs/sphinx/qapidoc.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
(limited to 'docs')
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 @@ class QAPISchemaGenRSTVisitor(QAPISchemaVisitor):
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
--
cgit v1.2.3-55-g7522