From 3c1c3a3947dfc95b5c5c73838fc6958d45aaf5de Mon Sep 17 00:00:00 2001 From: Dirk Roessler Date: Tue, 30 Aug 2022 15:11:05 +0200 Subject: [PATCH] [configuration parameters] Place default value at start of description --- doc/build-doc.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/doc/build-doc.py b/doc/build-doc.py index bb32400d..27aa8480 100644 --- a/doc/build-doc.py +++ b/doc/build-doc.py @@ -60,24 +60,20 @@ def xml_collect_params(param_nodes, struct_nodes, group_nodes, prefix): prefix = prefix[:-1] name = "" + desc = xml_desc_lines(param_node) options += "\n.. confval:: %s%s\n\n" % (prefix, name) default = param_node.get('default') + + if default: + options += " Default: ``%s``\n\n" % default if type_: options += " Type: *%s*\n\n" % type_ if unit: options += " Unit: *%s*\n\n" % unit - - desc = xml_desc_lines(param_node) - # Description available if len(desc) > 0: for line in desc: options += " %s\n" % escape(line) - if default: - options += " Default is ``%s``." % default - # No description, but default - elif default: - options += " Default is ``%s``." % default # Nothing else: options += " *No description available*"