From faf407983908a3617b5ecbc0a514ea8dd357beb3 Mon Sep 17 00:00:00 2001 From: dave Date: Wed, 24 Mar 2004 02:14:18 +0000 Subject: Allow templates to be specified outside the RDoc tree git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@6008 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/rdoc/generators/html_generator.rb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'lib/rdoc/generators') diff --git a/lib/rdoc/generators/html_generator.rb b/lib/rdoc/generators/html_generator.rb index 8db578b93..ca3019f5c 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 -- cgit