File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
lib/rdoc/generator/template/darkfish Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 11<%- simple_files = @files.select { |f| f.text? } %>
2+ <%- if defined?(current) -%>
3+ <%- dir = current.full_name[%r{\A[^/]+(?=/)}] || current.page_name -%>
4+ <%- end -%>
25<%- unless simple_files.empty? then -%>
36 <div id ="fileindex-section " class ="nav-section ">
47 < h3 > Pages</ h3 >
1215 < li > < a href ="<%= rel_prefix %> / <%= f . path %> "> <%= h f . page_name %> </ a >
1316 <%- next -%>
1417 <%- end -%>
15- < li > < details > < summary > <%
18+ < li > < details <% if dir == n %> open <% end %> > < summary > <%
1619 if n == f . page_name
1720 %> < a href ="<%= rel_prefix %> / <%= f . path %> "> <%= h n %> </ a > <%
1821 else
Original file line number Diff line number Diff line change @@ -110,6 +110,10 @@ def test_generate_page
110110 assert_match ( re , index )
111111 summary = index [ re ]
112112 assert_match %r[<a href="\. /outer/inner_rdoc.html">inner</a>] , summary
113+ re = %r[<details open><summary><a href="\. /outer_rdoc\. html">outer</a></summary>.*?</details>]m
114+ assert_match ( re , File . read ( 'outer_rdoc.html' ) )
115+ re = %r[<details open><summary><a href="\. \. /outer_rdoc\. html">outer</a></summary>.*?</details>]m
116+ assert_match ( re , File . read ( 'outer/inner_rdoc.html' ) )
113117 end
114118
115119 def test_generate_dry_run
You can’t perform that action at this time.
0 commit comments