Skip to content
Browse files

explains why links are gsub'ed, and changes the regexp delimiters

  • Loading branch information...
1 parent e6f15f0 commit ed4be0a3a41dc53d3d01b7f4592a1a70a9f03121 @fxn fxn committed Jun 19, 2011
Showing with 4 additions and 1 deletion.
  1. +4 −1 Rakefile
5 Rakefile
@@ -61,6 +61,9 @@ 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 @@ 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"), 'w') do |f|

0 comments on commit ed4be0a

Please sign in to comment.
Something went wrong with that request. Please try again.