Skip to content

Commit 2436fc2

Browse files
author
Julien Pivotto
committed
(PDOC-43) Advanced formatting in parameters description
This commit allows you to add more advanced formatting in parameters description. This is useful to add cross-module links, or to add new lines, emphasis and so on. Closes puppetlabs#51.
1 parent 346832a commit 2436fc2

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

lib/puppet_x/puppetlabs/strings/yard/templates/default/definedtype/setup.rb

+4-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ def parameter_details
2424

2525
@param_details = []
2626

27-
@param_details = @template_helper.extract_param_details(params, param_tags, true)
27+
@template_helper.extract_param_details(params, param_tags, true).each do |param|
28+
param[:desc] = htmlify_line(param[:desc]) if param[:desc]
29+
@param_details << param
30+
end
2831

2932
erb(:parameter_details)
3033
end

lib/puppet_x/puppetlabs/strings/yard/templates/default/html_helper.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def generate_parameters(params, object)
7474
end
7575

7676
if param[:desc]
77-
result << " - <div class=\"inline\"><p> #{param[:desc]} </p></div>"
77+
result << " - #{param[:desc]}"
7878
end
7979

8080
if !param[:exists?]

0 commit comments

Comments
 (0)