From d98884b75df3676f94d93fbaf6372ca705dc2aee Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Fri, 20 Mar 2020 10:18:04 +0100 Subject: qapi: Reject section markup in definition documentation Section markup in definition documentation makes no sense and can produce invalid Texinfo. Reject. Signed-off-by: Markus Armbruster Message-Id: <20200320091805.5585-2-armbru@redhat.com> Reviewed-by: Eric Blake --- scripts/qapi/parser.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'scripts') diff --git a/scripts/qapi/parser.py b/scripts/qapi/parser.py index abadacbb0e..f12c67d7d2 100644 --- a/scripts/qapi/parser.py +++ b/scripts/qapi/parser.py @@ -282,6 +282,11 @@ class QAPISchemaParser: doc.end_comment() self.accept() return doc + if self.val.startswith('# ='): + if doc.symbol: + raise QAPIParseError( + self, + "unexpected '=' markup in definition documentation") doc.append(self.val) self.accept(False) -- cgit v1.2.3