File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed
lib/rdoc/generator/template/darkfish Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change 14
14
-%> < code > <%= index_klass . name %> </ code > <%-
15
15
end
16
16
end
17
- -%>
18
- <%- traverse = proc do |klasses | -%>
17
+ if top = all_classes [ nil ]
18
+ solo = top . one? { |klass | klass . display? }
19
+ traverse = proc do |klasses | -%>
19
20
< ul class ="link-list ">
20
- <%- klasses . each do |index_klass | -%>
21
- <%- if children = all_classes [ index_klass . full_name ] -%>
22
- < li > < details > < summary > <% link . call ( index_klass ) %> </ summary >
23
- <%- traverse . call ( children ) -%>
21
+ <%- klasses . each do |index_klass | -%>
22
+ <%- if children = all_classes [ index_klass . full_name ] -%>
23
+ < li > < details <% if solo ; solo = false %> open <% end %> > < summary > <% link . call ( index_klass ) %> </ summary >
24
+ <%- traverse . call ( children ) -%>
24
25
</ ul > </ details >
25
- <%- elsif index_klass . display? -%>
26
+ <%- elsif index_klass . display? -%>
26
27
< li > <% link . call ( index_klass , true ) %>
28
+ <%- end -%>
27
29
<%- end -%>
28
30
<%- end -%>
31
+ <%- traverse . call ( top ) -%>
29
32
<%- end -%>
30
- <%- traverse . call ( all_classes [ nil ] ) -%>
31
33
</ div >
You can’t perform that action at this time.
0 commit comments