summaryrefslogtreecommitdiff
path: root/lib/rdoc
diff options
context:
space:
mode:
authordave <dave@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-03-24 02:14:18 +0000
committerdave <dave@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-03-24 02:14:18 +0000
commit45eeeb16918da8e8820c1d1da2882fe4c740fae3 (patch)
treee1761a9cbf91ee0ac0dd2e85e3f2d30ea3ae6405 /lib/rdoc
parent6c3676442a0ab3b45f48bf0a4d205fddc7a24c31 (diff)
Allow templates to be specified outside the RDoc tree
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6008 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rdoc')
-rw-r--r--lib/rdoc/generators/html_generator.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/rdoc/generators/html_generator.rb b/lib/rdoc/generators/html_generator.rb
index 8db578b934..ca3019f5cc 100644
--- a/lib/rdoc/generators/html_generator.rb
+++ b/lib/rdoc/generators/html_generator.rb
@@ -1110,11 +1110,15 @@ module Generators
private
##
- # Load up the HTML template specified in the options
+ # Load up the HTML template specified in the options.
+ # If the template name contains a slash, use it literally
#
def load_html_template
- template = File.join("rdoc/generators/template",
- @options.generator.key, @options.template)
+ template = @options.template
+ unless template =~ %r{/|\\}
+ template = File.join("rdoc/generators/template",
+ @options.generator.key, template)
+ end
require template
extend RDoc::Page
rescue LoadError