Skip to content

Commit

Permalink
Fix option tag handling with no data types
Browse files Browse the repository at this point in the history
Do not error if no data types are provided to the option tag.
Instead, generate a suitable line excluding the data type.
  • Loading branch information
seanmil committed Aug 4, 2023
1 parent e4525f7 commit 7717155
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/puppet-strings/markdown/templates/classes_and_defines.erb
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,11 @@ Data type:<%= code_maybe_block(param[:types].join(', ')) %>
Options:

<% options_for_param(param[:name]).each do |o| -%>
<% if o[:opt_types] -%>
* **<%= o[:opt_name] %>** `<%= o[:opt_types][0] %>`: <%= o[:opt_text] %>
<% else -%>
* **<%= o[:opt_name] %>**: <%= o[:opt_text] %>
<% end -%>
<% end -%>
<% end -%>
Expand Down

0 comments on commit 7717155

Please sign in to comment.