diff --git a/lib/puppet-strings/markdown/templates/classes_and_defines.erb b/lib/puppet-strings/markdown/templates/classes_and_defines.erb index 57c58dd..aa89832 100644 --- a/lib/puppet-strings/markdown/templates/classes_and_defines.erb +++ b/lib/puppet-strings/markdown/templates/classes_and_defines.erb @@ -17,9 +17,13 @@ <% if see -%> * **See also** <% see.each do |sa| -%> +<% if sa[:name] -%> <%= sa[:name] %> +<% end -%> +<% if sa[:text] -%> <%= sa[:text] %> <% end -%> +<% end -%> <% end -%> <% if examples -%> @@ -34,7 +38,7 @@ <% end -%> <% end -%> -<% if params %> +<% if params -%> #### Parameters The following parameters are available in the `<%= name %>` <%= @type %>. @@ -62,4 +66,3 @@ Default value: <%= value_string(defaults[param[:name]]) %> <% end -%> <% end -%> <% end -%> - diff --git a/lib/puppet-strings/markdown/templates/resource_type.erb b/lib/puppet-strings/markdown/templates/resource_type.erb index 064502b..1feb202 100644 --- a/lib/puppet-strings/markdown/templates/resource_type.erb +++ b/lib/puppet-strings/markdown/templates/resource_type.erb @@ -17,9 +17,13 @@ <% if see -%> * **See also** <% see.each do |sa| -%> +<% if sa[:name] -%> <%= sa[:name] %> +<% end -%> +<% if sa[:text] -%> <%= sa[:text] %> <% end -%> +<% end -%> <% end -%> <% if examples -%> @@ -114,4 +118,3 @@ Default value: <%= value_string(param[:default]) %> <% end -%> <% end -%> <% end -%> - diff --git a/spec/fixtures/unit/markdown/output.md b/spec/fixtures/unit/markdown/output.md index ee09ed4..307c620 100644 --- a/spec/fixtures/unit/markdown/output.md +++ b/spec/fixtures/unit/markdown/output.md @@ -41,7 +41,6 @@ An overview for a simple class. * **See also** www.puppet.com - #### Examples ##### This is an example @@ -62,7 +61,6 @@ class { 'klass': } ``` - #### Parameters The following parameters are available in the `klass` class. @@ -96,7 +94,6 @@ Third param. Default value: 'hi' - ## Defined types ### klass::dt @@ -108,7 +105,6 @@ An overview for a simple defined type. * **See also** www.puppet.com - #### Examples ##### Here's an example of this type: @@ -120,7 +116,6 @@ klass::dt { 'foo': } ``` - #### Parameters The following parameters are available in the `klass::dt` defined type. @@ -160,7 +155,6 @@ Fourth param. Default value: `true` - ## Resource types ### apt_key @@ -211,7 +205,6 @@ _*this data type contains a regex that may not be accurately reflected in genera The ID of the key you want to manage. - ### database An example database server type. @@ -274,7 +267,6 @@ Whether or not to encrypt the database. Default value: `false` - ## Functions ### func diff --git a/spec/fixtures/unit/markdown/output_with_plan.md b/spec/fixtures/unit/markdown/output_with_plan.md index fbd6e07..710cef9 100644 --- a/spec/fixtures/unit/markdown/output_with_plan.md +++ b/spec/fixtures/unit/markdown/output_with_plan.md @@ -41,7 +41,6 @@ An overview for a simple class. * **See also** www.puppet.com - #### Examples ##### This is an example @@ -62,7 +61,6 @@ class { 'klass': } ``` - #### Parameters The following parameters are available in the `klass` class. @@ -96,7 +94,6 @@ Third param. Default value: 'hi' - ## Defined types ### klass::dt @@ -108,7 +105,6 @@ An overview for a simple defined type. * **See also** www.puppet.com - #### Examples ##### Here's an example of this type: @@ -120,7 +116,6 @@ klass::dt { 'foo': } ``` - #### Parameters The following parameters are available in the `klass::dt` defined type. @@ -160,7 +155,6 @@ Fourth param. Default value: `true` - ## Resource types ### apt_key @@ -211,7 +205,6 @@ _*this data type contains a regex that may not be accurately reflected in genera The ID of the key you want to manage. - ### database An example database server type. @@ -274,7 +267,6 @@ Whether or not to encrypt the database. Default value: `false` - ## Functions ### func @@ -449,7 +441,6 @@ Path to file you want backup to A simple plan. - #### Parameters The following parameters are available in the `plann` plan. @@ -474,4 +465,3 @@ Third param. Default value: 1 -