From b543ed3ac8089e439e57ad5f667e35871882bd07 Mon Sep 17 00:00:00 2001 From: drbrain Date: Mon, 7 Jan 2008 01:36:33 +0000 Subject: Collapse namespaces and refactor requires in RDoc git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/rdoc/generators/html_generator.rb | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'lib/rdoc/generators/html_generator.rb') diff --git a/lib/rdoc/generators/html_generator.rb b/lib/rdoc/generators/html_generator.rb index 1497ed7483..acc6ab259f 100644 --- a/lib/rdoc/generators/html_generator.rb +++ b/lib/rdoc/generators/html_generator.rb @@ -1,10 +1,7 @@ require 'fileutils' -require 'rdoc/options' -require 'rdoc/template' -require 'rdoc/markup/simple_markup' +require 'rdoc/generators' require 'rdoc/markup/simple_markup/to_html' -require 'cgi' module Generators @@ -780,7 +777,9 @@ module Generators end def filename_to_label - @context.file_relative_name.gsub(/%|\/|\?|\#/) {|s| '%' + ("%x" % s[0]) } + @context.file_relative_name.gsub(/%|\/|\?|\#/) do |s| + '%%%x' % s[0].unpack('C') + end end def index_name @@ -1177,7 +1176,7 @@ module Generators # Generators may need to return specific subclasses depending on the # options they are passed. Because of this we create them using a factory - def HTMLGenerator.for(options) + def self.for(options) AllReferences::reset HtmlMethod::reset -- cgit v1.2.3