-
Notifications
You must be signed in to change notification settings - Fork 446
Description
I often want to link to other files (licenses, help docs, etc) in my RDoc. In RDoc 1.0 such links can be made using something like:
{file}[link:files/file_name_ext.html]
But as pointed out in an issue regarding YARD and rubydoc.info, this syntax assumes the location of the file. Obviously the links break between RDoc/YARD, but I found they also break between RDoc 1.0 and RDoc 3.8. It also breaks on GitHub... rendered .rdoc files have links that don't link to the intended files.
Maybe nothing can be done for everywhere, but is there a way to write portable links between RDoc 1.0 and RDoc 3.8? I'd like these links to work when people install the RDoc via Rubygems and I don't think I can assume RDoc 3.8 has been installed. If there is one, I plan on submitting a pull request to the GitHub markup library so that links can work on GitHub (it may involve a little gsub to reference the file in the repo but who knows they may go for it).
This gist illustrates the issue: https://gist.github.com/1097310 Generate with:
rdoc --main README.rdoc README.rdoc file.txt
When you use RDoc 1.0 you get a working link and a file like 'doc/files/file_txt.html'. When you use RDoc 3.8 you get a broken link and a file like 'doc/file_txt.html'.