Skip to content

Commit

Permalink
Merge pull request #171 from eputnam/plans_toc
Browse files Browse the repository at this point in the history
(maint) display Plans in markdown table of contents
  • Loading branch information
hunner committed Apr 4, 2018
2 parents a4e9150 + d4ca490 commit 99c53d1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/puppet-strings/markdown/puppet_plans.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def self.render
def self.toc_info
final = ["Plans"]

in_classes.each do |plan|
in_plans.each do |plan|
final.push(plan.toc_info)
end

Expand Down
3 changes: 2 additions & 1 deletion lib/puppet-strings/markdown/table_of_contents.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ def self.render
PuppetStrings::Markdown::DefinedTypes,
PuppetStrings::Markdown::ResourceTypes,
PuppetStrings::Markdown::Functions,
PuppetStrings::Markdown::PuppetTasks].each do |r|
PuppetStrings::Markdown::PuppetTasks,
PuppetStrings::Markdown::PuppetPlans].each do |r|
toc = r.toc_info
group_name = toc.shift
group = toc
Expand Down
4 changes: 4 additions & 0 deletions spec/fixtures/unit/markdown/output_with_plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@

* [`(stdin)`](#(stdin)): Allows you to backup your database to local file.

## Plans

* [`plann`](#plann): A simple plan.

## Classes

### klass
Expand Down

0 comments on commit 99c53d1

Please sign in to comment.