diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2022-03-22 01:13:06 +0900 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2022-03-22 01:32:13 +0900 |
commit | 92ef73a91833aa006d7a99886712f7583af779ec (patch) | |
tree | 0001e2999f41c1c6d918354890177ec290f0adfd /lib/rdoc/generator | |
parent | dafe5c1323f20c04d8378ff003af2c04adb379c9 (diff) | |
download | ruby-92ef73a91833aa006d7a99886712f7583af779ec.tar.gz |
[ruby/rdoc] Expand the enclosing tree of the current file
https://github.com/ruby/rdoc/commit/f9f90ef2ff
Diffstat (limited to 'lib/rdoc/generator')
-rw-r--r-- | lib/rdoc/generator/template/darkfish/_sidebar_pages.rhtml | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/rdoc/generator/template/darkfish/_sidebar_pages.rhtml b/lib/rdoc/generator/template/darkfish/_sidebar_pages.rhtml index f3b6cf3a05..0ed683ca14 100644 --- a/lib/rdoc/generator/template/darkfish/_sidebar_pages.rhtml +++ b/lib/rdoc/generator/template/darkfish/_sidebar_pages.rhtml @@ -1,4 +1,7 @@ <%- simple_files = @files.select { |f| f.text? } %> +<%- if defined?(current) -%> + <%- dir = current.full_name[%r{\A[^/]+(?=/)}] || current.page_name -%> +<%- end -%> <%- unless simple_files.empty? then -%> <div id="fileindex-section" class="nav-section"> <h3>Pages</h3> @@ -12,7 +15,7 @@ <li><a href="<%= rel_prefix %>/<%= f.path %>"><%= h f.page_name %></a> <%- next -%> <%- end -%> - <li><details><summary><% + <li><details<% if dir == n %> open<% end %>><summary><% if n == f.page_name %><a href="<%= rel_prefix %>/<%= f.path %>"><%= h n %></a><% else |