diff options
Diffstat (limited to 'lib/rdoc/generator/darkfish.rb')
-rw-r--r-- | lib/rdoc/generator/darkfish.rb | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/lib/rdoc/generator/darkfish.rb b/lib/rdoc/generator/darkfish.rb index ba62646e77..26f545b14b 100644 --- a/lib/rdoc/generator/darkfish.rb +++ b/lib/rdoc/generator/darkfish.rb @@ -698,18 +698,18 @@ class RDoc::Generator::Darkfish return template if template - template = if page then - assemble_template file - else - file.read - end - - erbout = if page then - 'io' - else - file_var = File.basename(file).sub(/\..*/, '') - "_erbout_#{file_var}" - end + if page then + template = assemble_template file + erbout = 'io' + else + template = file.read + template = template.encode @options.encoding if + Object.const_defined? :Encoding + + file_var = File.basename(file).sub(/\..*/, '') + + erbout = "_erbout_#{file_var}" + end template = klass.new template, nil, '<>', erbout @template_cache[file] = template |