summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordave <dave@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-04-04 23:19:58 +0000
committerdave <dave@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-04-04 23:19:58 +0000
commit4eda6b6057089c058e9e2a9e318ee4d28f814cec (patch)
tree2d0385c3d29e76ec7795b994d7bdb937670becd1
parentad07498d94928d20afba35c2532b47404b078a34 (diff)
Remove leading ./ from filenames so that cross references work OK
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6088 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--lib/rdoc/generators/html_generator.rb2
-rw-r--r--lib/rdoc/rdoc.rb2
3 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index a7b5de3..7533bc4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Mon Apr 5 08:18:23 2004 Dave Thomas <dave@pragprog.com>
+
+ * lib/rdoc/rdoc.rb: Remove leading ./ from file names so that cross
+ references work properly.
+
Sun Apr 4 20:33:42 2004 Minero Aoki <aamine@loveruby.net>
* eval.c (Init_load): make $LOADED_FEATURES built-in.
diff --git a/lib/rdoc/generators/html_generator.rb b/lib/rdoc/generators/html_generator.rb
index ca3019f..75b056b 100644
--- a/lib/rdoc/generators/html_generator.rb
+++ b/lib/rdoc/generators/html_generator.rb
@@ -61,7 +61,7 @@ module Generators
class AllReferences
@@refs = {}
-
+
def AllReferences::reset
@@refs = {}
end
diff --git a/lib/rdoc/rdoc.rb b/lib/rdoc/rdoc.rb
index d55a404..060e9ba 100644
--- a/lib/rdoc/rdoc.rb
+++ b/lib/rdoc/rdoc.rb
@@ -166,7 +166,7 @@ module RDoc
next if options.exclude && options.exclude =~ rel_file_name
case type = File.stat(rel_file_name).ftype
when "file"
- file_list << rel_file_name if force_doc || ParserFactory.can_parse(rel_file_name)
+ file_list << rel_file_name.sub(/^\.\//, '') if force_doc || ParserFactory.can_parse(rel_file_name)
when "directory"
next if rel_file_name == "CVS" || rel_file_name == ".svn"
dot_doc = File.join(rel_file_name, DOT_DOC_FILENAME)