summaryrefslogtreecommitdiff
path: root/lib/rdoc/markup/to_html_crossref.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rdoc/markup/to_html_crossref.rb')
-rw-r--r--lib/rdoc/markup/to_html_crossref.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/rdoc/markup/to_html_crossref.rb b/lib/rdoc/markup/to_html_crossref.rb
index 405f68c14f..d27e0ab627 100644
--- a/lib/rdoc/markup/to_html_crossref.rb
+++ b/lib/rdoc/markup/to_html_crossref.rb
@@ -145,6 +145,9 @@ class RDoc::Markup::ToHtmlCrossref < RDoc::Markup::ToHtml
if path =~ /#/ then
path << "-label-#{label}"
+ elsif ref.sections and
+ ref.sections.any? { |section| label == section.title } then
+ path << "##{label}"
else
path << "#label-#{label}"
end if label