From: Marc-André Lureau <marcandre.lur...@redhat.com> Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> Reviewed-by: Markus Armbruster <arm...@redhat.com> Message-Id: <20180305172951.2150-2-marcandre.lur...@redhat.com> Signed-off-by: Eric Blake <ebl...@redhat.com> --- scripts/qapi/doc.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/scripts/qapi/doc.py b/scripts/qapi/doc.py index 0ea68bf8134..79d11bbe9b5 100644 --- a/scripts/qapi/doc.py +++ b/scripts/qapi/doc.py @@ -134,10 +134,9 @@ def texi_enum_value(value): def texi_member(member, suffix=''): """Format a table of members item for an object type member""" typ = member.type.doc_type() - return '@item @code{%s%s%s}%s%s\n' % ( - member.name, - ': ' if typ else '', - typ if typ else '', + membertype = ': ' + typ if typ else '' + return '@item @code{%s%s}%s%s\n' % ( + member.name, membertype, ' (optional)' if member.optional else '', suffix) -- 2.14.3