(PDOC-17) htmlify class/defined type descriptions
Prior to this commit we were not calling htmlify on the docstring for the description of a puppet class on defined type. This meant that the raw string would be displayed without paying attention to any potential markdown or rdoc formatting present. Now the YARD method htmlify is being called on the docstring so that it will be displayed properly. Additionally clean up an unclear comment and fix a small bug in the way parameter information is processed.
This commit is contained in:
parent
e85f58a64e
commit
1fae19e5ae
|
@ -1,6 +1,6 @@
|
|||
<div class="docstring">
|
||||
<div class="discussion">
|
||||
<p><%= @class_details[:desc] %></p>
|
||||
<p><%= htmlify(@class_details[:desc]) %></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tags">
|
||||
|
|
|
@ -61,7 +61,7 @@ end
|
|||
# @option opts [String] :fq_name The fully qualified parameter name
|
||||
# @option opts [String] :desc The description provided in the comment
|
||||
# @options opts [Array] :types The parameter type(s) specified in the comment
|
||||
# @options opts [Boolean] :exists? True only if the parameter actually exists and just not just defined in the comment
|
||||
# @options opts [Boolean] :exists? True only if the parameter exists in the documented logic and not just in a comment
|
||||
def extract_param_details(params_hash, tags_hash)
|
||||
parameter_info = []
|
||||
|
||||
|
@ -79,7 +79,7 @@ def extract_param_details(params_hash, tags_hash)
|
|||
tags_hash.each do |tag|
|
||||
param_exists = false
|
||||
parameter_info.each do |parameter|
|
||||
if parameter.has_value?(tag.name)
|
||||
if parameter[:name] == tag.name
|
||||
param_exists = true
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue