Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix option tag handling with no data types #361

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
  • Loading branch information
seanmil committed Aug 4, 2023
commit 77171556479f88961fd00c1ea1c9adc5cb9a3180
Original file line number Diff line number Diff line change
@@ -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 -%>