mirror of
https://github.com/github/rails.git
synced 2026-01-09 22:58:02 -05:00
To solve the problem of links being broken in GitHub for the sake of api site, have them replaced at runtime during rdoc generation
This commit is contained in:
1
Rakefile
1
Rakefile
@@ -71,6 +71,7 @@ RDoc::Task.new do |rdoc|
|
||||
# since no autolinking happens there and RDoc displays the backslash
|
||||
# otherwise.
|
||||
rdoc_main.gsub!(/^(?=\S).*?\b(?=Rails)\b/) { "#$&\\" }
|
||||
rdoc_main.gsub!(/link:blob\/master\/(\w+)\/README.rdoc/, "link:files/\\1/README_rdoc.html")
|
||||
|
||||
File.open(RDOC_MAIN, 'w') do |f|
|
||||
f.write(rdoc_main)
|
||||
|
||||
Reference in New Issue
Block a user