File tree 1 file changed +4
-1
lines changed
1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,9 @@ RDoc::Task.new do |rdoc|
61
61
# The temporary solution is to have a README.rdoc without backslashes for
62
62
# GitHub, and gsub it to generate the main page of the API.
63
63
#
64
+ # Also, relative links in GitHub have to point to blobs, whereas in the API
65
+ # they need to point to files.
66
+ #
64
67
# The idea for the future is to have totally different files, since the
65
68
# API is no longer a generic entry point to Rails and deserves a
66
69
# dedicated main page specifically thought as an API entry point.
@@ -71,7 +74,7 @@ RDoc::Task.new do |rdoc|
71
74
# since no autolinking happens there and RDoc displays the backslash
72
75
# otherwise.
73
76
rdoc_main . gsub! ( /^(?=\S ).*?\b (?=Rails)\b / ) { "#$&\\ " }
74
- rdoc_main . gsub! ( / link:blob\ / master\ / (\w +)\ / README.rdoc/ , "link:files/\\ 1/README_rdoc.html" )
77
+ rdoc_main . gsub! ( %r{ link:blob/master/(\w +)/README\ . rdoc} , "link:files/\\ 1/README_rdoc.html" )
75
78
76
79
File . open ( RDOC_MAIN , 'w' ) do |f |
77
80
f . write ( rdoc_main )
You can’t perform that action at this time.
0 commit comments