diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/rdoc.rb | 2 | ||||
-rw-r--r-- | lib/rdoc/any_method.rb | 1 | ||||
-rw-r--r-- | lib/rdoc/code_object.rb | 6 | ||||
-rw-r--r-- | lib/rdoc/generator/template/darkfish/rdoc.css | 4 | ||||
-rw-r--r-- | lib/rdoc/markup/preprocess.rb | 1 | ||||
-rw-r--r-- | lib/rdoc/options.rb | 2 | ||||
-rw-r--r-- | lib/rdoc/parser/c.rb | 2 | ||||
-rw-r--r-- | lib/rdoc/parser/ruby.rb | 2 | ||||
-rw-r--r-- | lib/rdoc/parser/simple.rb | 5 |
9 files changed, 16 insertions, 9 deletions
diff --git a/lib/rdoc.rb b/lib/rdoc.rb index 600cd92e0f..3dbb63abd3 100644 --- a/lib/rdoc.rb +++ b/lib/rdoc.rb @@ -383,7 +383,7 @@ module RDoc ## # RDoc version you are using - VERSION = '2.5.5' + VERSION = '2.5.6' ## # Name of the dotfile that contains the description of files to be processed 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 |