diff options
Diffstat (limited to 'lib/rdoc/markup')
-rw-r--r-- | lib/rdoc/markup/to_html_crossref.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/rdoc/markup/to_html_crossref.rb b/lib/rdoc/markup/to_html_crossref.rb index 4a1350a73c..9314f04fae 100644 --- a/lib/rdoc/markup/to_html_crossref.rb +++ b/lib/rdoc/markup/to_html_crossref.rb @@ -153,7 +153,11 @@ class RDoc::Markup::ToHtmlCrossref < RDoc::Markup::ToHtml ref.sections.any? { |section| label == section.title } then path << "##{label}" else - path << "##{ref.aref}-label-#{label}" + if ref.respond_to?(:aref) + path << "##{ref.aref}-label-#{label}" + else + path << "#label-#{label}" + end end if label "<a href=\"#{path}\">#{text}</a>" |