We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent be3cfab commit 0486f08Copy full SHA for 0486f08
1 file changed
doc-util/render.libsonnet
@@ -102,10 +102,16 @@
102
]) + '\n\n'
103
else ''
104
)
105
- + (root.templates.index % root.index(package.sections))
106
- + '\n## Fields\n\n'
107
- + root.renderValues(package.values)
108
- + root.renderSections(package.sections),
+ + (if std.length(package.sections) > 0
+ then (root.templates.index % root.index(package.sections))
+ else '')
+ + (if std.length(package.values) > 0
109
+ || std.length(package.sections) > 0
110
+ then
111
+ '\n## Fields\n\n'
112
+ + root.renderValues(package.values)
113
+ + root.renderSections(package.sections)
114
+ else ''),
115
116
index(sections, depth=0, prefixes=[])::
117
std.join('\n', [
0 commit comments