diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-11-19 00:47:33 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-11-19 00:47:33 +0000 |
commit | cc46b530b00c83bf4a867fd42d81c63bc43c0b83 (patch) | |
tree | 0e4c0f13bc642824acf88fa7f24cf616212fbec3 /lib/rdoc | |
parent | a7fa4d5d9aab150ad4b0c3f3217fe444df69f527 (diff) |
* lib/rdoc: Update to RDoc master a1195ce. Changes include:
Improved accessibility of the main sidebar navigation.
Fixed handling of regexp options in HTML source highlighting.
* test/rdoc: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43715 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rdoc')
-rw-r--r-- | lib/rdoc/constant.rb | 10 | ||||
-rw-r--r-- | lib/rdoc/generator/template/darkfish/_sidebar_navigation.rhtml | 6 | ||||
-rw-r--r-- | lib/rdoc/generator/template/darkfish/rdoc.css | 12 | ||||
-rw-r--r-- | lib/rdoc/markup/parser.rb | 4 | ||||
-rw-r--r-- | lib/rdoc/ruby_lex.rb | 4 | ||||
-rw-r--r-- | lib/rdoc/store.rb | 2 |
6 files changed, 18 insertions, 20 deletions
diff --git a/lib/rdoc/constant.rb b/lib/rdoc/constant.rb index 97985cbf99..48b32aaf98 100644 --- a/lib/rdoc/constant.rb +++ b/lib/rdoc/constant.rb @@ -63,15 +63,7 @@ class RDoc::Constant < RDoc::CodeObject # for a documented class or module. def documented? - return true if super - return false unless @is_alias_for - case @is_alias_for - when String then - found = @store.find_class_or_module @is_alias_for - return false unless found - @is_alias_for = found - end - @is_alias_for.documented? + super or is_alias_for && is_alias_for.documented? end ## diff --git a/lib/rdoc/generator/template/darkfish/_sidebar_navigation.rhtml b/lib/rdoc/generator/template/darkfish/_sidebar_navigation.rhtml index 7b9c4f73b3..d7f330840a 100644 --- a/lib/rdoc/generator/template/darkfish/_sidebar_navigation.rhtml +++ b/lib/rdoc/generator/template/darkfish/_sidebar_navigation.rhtml @@ -1,11 +1,11 @@ -<div id="home-section" role="banner" class="nav-section"> +<div id="home-section" role="region" title="Quick navigation" class="nav-section"> <h2> <a href="<%= rel_prefix %>/index.html" rel="home">Home</a> </h2> - <h3> + <div id="table-of-contents-navigation"> <a href="<%= rel_prefix %>/table_of_contents.html#pages">Pages</a> <a href="<%= rel_prefix %>/table_of_contents.html#classes">Classes</a> <a href="<%= rel_prefix %>/table_of_contents.html#methods">Methods</a> - </h3> + </div> </div> diff --git a/lib/rdoc/generator/template/darkfish/rdoc.css b/lib/rdoc/generator/template/darkfish/rdoc.css index f86edb8367..4f22adaae1 100644 --- a/lib/rdoc/generator/template/darkfish/rdoc.css +++ b/lib/rdoc/generator/template/darkfish/rdoc.css @@ -193,7 +193,8 @@ nav h2 { text-align: center; } -nav h3 { +nav h3, +#table-of-contents-navigation { margin: 0; padding: 2px 8px 2px 8px; text-align: right; @@ -213,8 +214,13 @@ nav p { border-top: 0; } -#home-section h2, -#home-section h3 { +#home-section h2 { + text-align: center; +} + +#table-of-contents-navigation { + font-size: 1.2em; + font-weight: bold; text-align: center; } diff --git a/lib/rdoc/markup/parser.rb b/lib/rdoc/markup/parser.rb index 4d0cf1127e..cc828a4513 100644 --- a/lib/rdoc/markup/parser.rb +++ b/lib/rdoc/markup/parser.rb @@ -535,8 +535,8 @@ class RDoc::Markup::Parser end ## - # Calculates the column (by character) and line of the current token from - # +scanner+ based on +byte_offset+. + # Calculates the column (by character) and line of the current token based + # on +byte_offset+. def token_pos byte_offset offset = char_pos byte_offset diff --git a/lib/rdoc/ruby_lex.rb b/lib/rdoc/ruby_lex.rb index 06a82ef978..d470d2b5f8 100644 --- a/lib/rdoc/ruby_lex.rb +++ b/lib/rdoc/ruby_lex.rb @@ -1231,8 +1231,8 @@ class RDoc::RubyLex end if @ltype == "/" - if peek(0) =~ /i|m|x|o|e|s|u|n/ - getc + while peek(0) =~ /i|m|x|o|e|s|u|n/ + str << getc end end diff --git a/lib/rdoc/store.rb b/lib/rdoc/store.rb index fde6f0695b..00fa1e2329 100644 --- a/lib/rdoc/store.rb +++ b/lib/rdoc/store.rb @@ -663,7 +663,7 @@ class RDoc::Store end ## - # Converts the variable => ClassModule map +variables+ from a C parser into + # Converts the variable => ClassModule map +variables+ from a C parser into # a variable => class name map. def make_variable_map variables |