Skip to content

Commit

Permalink
[configuration parameters] Place default value at start of description
Browse files Browse the repository at this point in the history
  • Loading branch information
gempa-dirk authored and gempa-jabe committed Sep 26, 2022
1 parent 48b4b1d commit 3c1c3a3
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions doc/build-doc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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*"
Expand Down

0 comments on commit 3c1c3a3

Please sign in to comment.