diff options
author | Xavier Noria <fxn@hashref.com> | 2011-06-19 11:39:52 +0200 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2011-06-19 11:45:36 +0200 |
commit | ed4be0a3a41dc53d3d01b7f4592a1a70a9f03121 (patch) | |
tree | 7f675a7400a96ab0cfb5c31dec28afcd6bb4c01c /Rakefile | |
parent | e6f15f0553a44b746e5d319eb0186b579bb3a2db (diff) | |
download | rails-ed4be0a3a41dc53d3d01b7f4592a1a70a9f03121.tar.gz rails-ed4be0a3a41dc53d3d01b7f4592a1a70a9f03121.tar.bz2 rails-ed4be0a3a41dc53d3d01b7f4592a1a70a9f03121.zip |
explains why links are gsub'ed, and changes the regexp delimiters
Diffstat (limited to 'Rakefile')
-rwxr-xr-x | Rakefile | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -61,6 +61,9 @@ RDoc::Task.new do |rdoc| # The temporary solution is to have a README.rdoc without backslashes for # GitHub, and gsub it to generate the main page of the API. # + # Also, relative links in GitHub have to point to blobs, whereas in the API + # they need to point to files. + # # The idea for the future is to have totally different files, since the # API is no longer a generic entry point to Rails and deserves a # dedicated main page specifically thought as an API entry point. @@ -71,7 +74,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") + rdoc_main.gsub!(%r{link:blob/master/(\w+)/README\.rdoc}, "link:files/\\1/README_rdoc.html") File.open(RDOC_MAIN, 'w') do |f| f.write(rdoc_main) |