Skip to content

Commit

Permalink
add data type list when having only data type aliases (fixes puppetla…
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Molnar committed Jun 9, 2022
1 parent dba16ed commit 86da723
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions lib/puppet-strings/yard/templates/default/layout/html/setup.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,6 @@ def create_menu_lists
title: 'Puppet Classes',
search_title: 'Puppet Classes'
},
{
type: 'puppet_data_type',
title: 'Data Types',
search_title: 'Data Types',
},
{
type: 'puppet_defined_type',
title: 'Defined Types',
Expand Down Expand Up @@ -129,6 +124,13 @@ def create_menu_lists

menu_lists.delete_if { |e| YARD::Registry.all(e[:type].intern).empty? }

# This is a special group containing two types
menu_lists << {
type: 'puppet_data_type',
title: 'Data Types',
search_title: 'Data Types',
} if ! YARD::Registry.all(:puppet_data_type,:puppet_data_type_alias).empty?

# We must always return at least one group, so always keep the files list
menu_lists << {
type: 'file',
Expand Down

0 comments on commit 86da723

Please sign in to comment.