codegen: Add missing closing angular bracket

We are matching `<parameter>` as well as `<para>`, and we
end up with broken XML in case the (expanded) description
starts with `<parameter>`.

Fixes: #2601
This commit is contained in:
Emmanuele Bassi 2022-02-15 11:51:11 +00:00
parent 6ddf760507
commit 17f38affa2

View File

@ -342,7 +342,7 @@ class DocbookCodeGenerator:
def expand_paras(self, s, expandParamsAndConstants):
s = self.expand(s, expandParamsAndConstants).strip()
res = []
if not s.startswith("<para"):
if not s.startswith("<para>"):
res.append("<para>")
for line in s.split("\n"):
line = line.strip()