diff --git a/scripts/apibuild.py b/scripts/apibuild.py
index dd82974c12..116ea9fe5f 100755
--- a/scripts/apibuild.py
+++ b/scripts/apibuild.py
@@ -2297,9 +2297,11 @@ class docBuilder:
def serialize_typedef(self, output, name):
id = self.idx.typedefs[name]
+ (since, comment) = self.retrieve_comment_tags(name, id.extra)
+ version_tag = len(since) > 0 and f" version='{since}'" or ""
if id.info[0:7] == 'struct ':
- output.write(" \n")
else:
- output.write(" \n \n" % (desc))
+ if comment is not None and comment != "":
+ output.write(">\n \n" % (comment))
output.write(" \n")
else:
output.write("/>\n")