summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/rdoc/generator/template/darkfish/table_of_contents.rhtml5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/rdoc/generator/template/darkfish/table_of_contents.rhtml b/lib/rdoc/generator/template/darkfish/table_of_contents.rhtml
index 09b5379fc0..c8a422a521 100644
--- a/lib/rdoc/generator/template/darkfish/table_of_contents.rhtml
+++ b/lib/rdoc/generator/template/darkfish/table_of_contents.rhtml
@@ -36,8 +36,9 @@
unless table.empty? then %>
<ul>
<%- table.each do |item| -%>
- <li><a href="<%= klass.path %>#<%= item.label(klass) %>"><%= item.plain_html %></a>
-<%- end -%>
+<%- label = item.respond_to?(:label) ? item.label(klass) : item.aref -%>
+ <li><a href="<%= klass.path %>#<%= label %>"><%= item.plain_html %></a>
+<%- end -%>
</ul>
<%- end -%>
</li>