(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:
Hailee Kenney 2015-01-05 16:01:43 -08:00
parent e85f58a64e
commit 1fae19e5ae
2 changed files with 3 additions and 3 deletions

View File

@ -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">

View File

@ -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