From 92ef73a91833aa006d7a99886712f7583af779ec Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Tue, 22 Mar 2022 01:13:06 +0900 Subject: [ruby/rdoc] Expand the enclosing tree of the current file https://github.com/ruby/rdoc/commit/f9f90ef2ff --- lib/rdoc/generator/template/darkfish/_sidebar_pages.rhtml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib') 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 -%>