summaryrefslogtreecommitdiff
path: root/lib/rdoc/generators/html_generator.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-01-07 01:36:33 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-01-07 01:36:33 +0000
commitb543ed3ac8089e439e57ad5f667e35871882bd07 (patch)
tree8a9655143d6d7047ad06fcc42a6a48a0f6b2e752 /lib/rdoc/generators/html_generator.rb
parentb0f13cfebec316491909e312608834c87792ca9f (diff)
Collapse namespaces and refactor requires in RDoc
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rdoc/generators/html_generator.rb')
-rw-r--r--lib/rdoc/generators/html_generator.rb11
1 files changed, 5 insertions, 6 deletions
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