Skip to content

Commit 7717155

Browse files
committed
Fix option tag handling with no data types
Do not error if no data types are provided to the option tag. Instead, generate a suitable line excluding the data type.
1 parent e4525f7 commit 7717155

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/puppet-strings/markdown/templates/classes_and_defines.erb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,11 @@ Data type:<%= code_maybe_block(param[:types].join(', ')) %>
7070
Options:
7171

7272
<% options_for_param(param[:name]).each do |o| -%>
73+
<% if o[:opt_types] -%>
7374
* **<%= o[:opt_name] %>** `<%= o[:opt_types][0] %>`: <%= o[:opt_text] %>
75+
<% else -%>
76+
* **<%= o[:opt_name] %>**: <%= o[:opt_text] %>
77+
<% end -%>
7478
<% end -%>
7579

7680
<% end -%>

0 commit comments

Comments
 (0)