summaryrefslogtreecommitdiff
path: root/lib/rdoc
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-23 02:32:20 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-23 02:32:20 +0000
commit400afca88a0adb5a380925dea61220e08a04022f (patch)
tree8820f8f9892d6dc75e4dd0f3110cd91844f15736 /lib/rdoc
parent30014a61567b1b672ae46ecf5ff27c059f6c4eea (diff)
Update to RDoc 2.5.6
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rdoc')
-rw-r--r--lib/rdoc/any_method.rb1
-rw-r--r--lib/rdoc/code_object.rb6
-rw-r--r--lib/rdoc/generator/template/darkfish/rdoc.css4
-rw-r--r--lib/rdoc/markup/preprocess.rb1
-rw-r--r--lib/rdoc/options.rb2
-rw-r--r--lib/rdoc/parser/c.rb2
-rw-r--r--lib/rdoc/parser/ruby.rb2
-rw-r--r--lib/rdoc/parser/simple.rb5
8 files changed, 15 insertions, 8 deletions
diff --git a/lib/rdoc/any_method.rb b/lib/rdoc/any_method.rb
index d93e673215..d742daa7b8 100644
--- a/lib/rdoc/any_method.rb
+++ b/lib/rdoc/any_method.rb
@@ -68,7 +68,6 @@ class RDoc::AnyMethod < RDoc::CodeObject
@text = text
@name = name
- @aref = nil
@aliases = []
@block_params = nil
@call_seq = nil
diff --git a/lib/rdoc/code_object.rb b/lib/rdoc/code_object.rb
index ea1a5eaffc..f8c4e33f7e 100644
--- a/lib/rdoc/code_object.rb
+++ b/lib/rdoc/code_object.rb
@@ -55,6 +55,11 @@ class RDoc::CodeObject
attr_accessor :force_documentation
##
+ # Hash of arbitrary metadata for this CodeObject
+
+ attr_reader :metadata
+
+ ##
# Our parent CodeObject
attr_accessor :parent
@@ -75,6 +80,7 @@ class RDoc::CodeObject
# Creates a new CodeObject that will document itself and its children
def initialize
+ @metadata = {}
@comment = ''
@document_children = true
diff --git a/lib/rdoc/generator/template/darkfish/rdoc.css b/lib/rdoc/generator/template/darkfish/rdoc.css
index 49052f4c8d..ffe996001a 100644
--- a/lib/rdoc/generator/template/darkfish/rdoc.css
+++ b/lib/rdoc/generator/template/darkfish/rdoc.css
@@ -103,9 +103,7 @@ body.file p {
list-style: none;
}
.indexpage ul :link,
-.indexpage ul :visited,
-.file #documentation ul :link,
-.file #documentation ul :visited {
+.indexpage ul :visited {
font-size: 16px;
}
diff --git a/lib/rdoc/markup/preprocess.rb b/lib/rdoc/markup/preprocess.rb
index b48f099119..f3925cc692 100644
--- a/lib/rdoc/markup/preprocess.rb
+++ b/lib/rdoc/markup/preprocess.rb
@@ -47,6 +47,7 @@ class RDoc::Markup::PreProcess
def include_file(name, indent)
if full_name = find_include_file(name) then
content = File.binread full_name
+ # HACK determine content type and force encoding
content = content.sub(/\A# .*coding[=:].*$/, '').lstrip
# strip leading '#'s, but only if all lines start with them
diff --git a/lib/rdoc/options.rb b/lib/rdoc/options.rb
index 45b69186f9..7b3a23ca5c 100644
--- a/lib/rdoc/options.rb
+++ b/lib/rdoc/options.rb
@@ -366,7 +366,7 @@ Usage: #{opt.program_name} [options] [names...]
end
end
- if ignored and not quiet then
+ unless ignored.empty? or quiet then
$stderr.puts "invalid options: #{ignored.join ', '}"
$stderr.puts '(invalid options are ignored)'
end
diff --git a/lib/rdoc/parser/c.rb b/lib/rdoc/parser/c.rb
index 27236a3ff5..05b1e77925 100644
--- a/lib/rdoc/parser/c.rb
+++ b/lib/rdoc/parser/c.rb
@@ -670,7 +670,7 @@ class RDoc::Parser::C < RDoc::Parser
@options.title = param
''
else
- warn "Unrecognized directive :#{directive}:"
+ context.metadata[directive] = param
false
end
end
diff --git a/lib/rdoc/parser/ruby.rb b/lib/rdoc/parser/ruby.rb
index e9cdc0b83e..c8bab57607 100644
--- a/lib/rdoc/parser/ruby.rb
+++ b/lib/rdoc/parser/ruby.rb
@@ -404,7 +404,7 @@ class RDoc::Parser::Ruby < RDoc::Parser
@options.title = param
''
else
- warn "Unrecognized directive :#{directive}:"
+ @top_level.metadata[directive] = param
false
end
end
diff --git a/lib/rdoc/parser/simple.rb b/lib/rdoc/parser/simple.rb
index 37125ff299..25fa3c5159 100644
--- a/lib/rdoc/parser/simple.rb
+++ b/lib/rdoc/parser/simple.rb
@@ -7,6 +7,8 @@ class RDoc::Parser::Simple < RDoc::Parser
parse_files_matching(//)
+ attr_reader :content # :nodoc:
+
##
# Prepare to parse a plain file
@@ -16,7 +18,8 @@ class RDoc::Parser::Simple < RDoc::Parser
preprocess = RDoc::Markup::PreProcess.new @file_name, @options.rdoc_include
preprocess.handle @content do |directive, param|
- warn "Unrecognized directive '#{directive}' in #{@file_name}"
+ top_level.metadata[directive] = param
+ false
end
end