diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-12-11 07:44:56 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-12-11 07:44:56 +0000 |
commit | b65b75bf2ce955dc8f5fb589732927acc8b72c29 (patch) | |
tree | 0e33d09bc3aeeef5c35dbf6fc404d7ab4658b9e8 /lib/rdoc/rdoc.rb | |
parent | d5ba73e0d9fd2fb9d1c787247c8755fa8ccc8404 (diff) | |
download | ruby-b65b75bf2ce955dc8f5fb589732927acc8b72c29.tar.gz |
* lib/rdoc/options.rb: Added --page-dir option for moving pages in
doc/ to the top-level.
* lib/rdoc/rdoc.rb: ditto.
* test/rdoc/test_rdoc_options.rb: Test for the above.
* test/rdoc/test_rdoc_rdoc.rb: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38311 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rdoc/rdoc.rb')
-rw-r--r-- | lib/rdoc/rdoc.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/rdoc/rdoc.rb b/lib/rdoc/rdoc.rb index eabf4fd3f7..76da5b4289 100644 --- a/lib/rdoc/rdoc.rb +++ b/lib/rdoc/rdoc.rb @@ -349,6 +349,12 @@ option) filename_path = Pathname(filename).expand_path relative_path = filename_path.relative_path_from @options.root + if @options.page_dir and + relative_path.to_s.start_with? @options.page_dir.to_s then + relative_path = + relative_path.relative_path_from @options.page_dir + end + top_level = @store.add_file filename, relative_path.to_s parser = RDoc::Parser.for top_level, filename, content, @options, @stats |