-
Notifications
You must be signed in to change notification settings - Fork 452
Description
When a heading contains text that matches a documented file path the cross reference system wraps the text in a link inside the header's own anchor link, producing invalid nested tags.
If i have a structure like these two files:
lib/pathname.rb:
class Pathname
endmaintainers.md:
# Maintainers
#### lib/pathname.rb
Then when generating the docs with rdoc --all lib/pathname.rb maintainers.md it generates the html of maintainers_md.html like this:
<h4 id="libpathnamerb">
<a href="#libpathnamerb"><a href="lib/pathname_rb.html">lib/pathname.rb</a></a>
</h4>which in the browser the heading ends up with only the inner tag, so clicking it navigates to the file's supposed doc page (which doesn't exist) instead of anchoring.
I think the correct behaviour is for the header to render as a plain anchor without referencing the actual file, because the purpose of a header is to label the section. I also saw this on the maintainers page on ruby docs that had this problem and clicking on a header like lib/pathname.rb goes into a 404.