Skip to content

Commit

Permalink
Merge pull request #1051 from MSP-Greg/MSP-Greg_kw_options
Browse files Browse the repository at this point in the history
Allow keyword options in option.erb templates

Fixes #1050
  • Loading branch information
lsegal committed Jan 7, 2017
2 parents e45a5bd + 4588e3a commit ea6b04b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion templates/default/tags/html/option.erb
@@ -1,6 +1,6 @@
<% if object.has_tag?(:option) %>
<% object.parameters.each do |param, default| %>
<% tags = object.tags(:option).select {|x| x.name.to_s == param.to_s.sub(/^\*+/, '') } %>
<% tags = object.tags(:option).select {|x| x.name.to_s == param.to_s.sub(/^\*+|:$/, '') } %>
<% next if tags.empty? %>
<p class="tag_title">Options Hash (<tt><%= param %></tt>):</p>
<ul class="option">
Expand Down
2 changes: 1 addition & 1 deletion templates/default/tags/text/option.erb
@@ -1,6 +1,6 @@
<% if object.has_tag?(:option) %>
<% object.parameters.each do |param, default| %>
<% tags = object.tags(:option).select {|x| x.name.to_s == param.to_s } %>
<% tags = object.tags(:option).select {|x| x.name.to_s == param.to_s.sub(/^\*+|:$/, '') } %>
<% next if tags.empty? %>
Options Hash (<%= param %>):
--------------<%= hr(param.to_s.length) %>--
Expand Down

0 comments on commit ea6b04b

Please sign in to comment.