mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
a7fa4d5d9a
commit
cc46b530b0
11 changed files with 52 additions and 29 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
||||||
|
Tue Nov 19 09:47:02 2013 Eric Hodel <drbrain@segment7.net>
|
||||||
|
|
||||||
|
* 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.
|
||||||
|
|
||||||
Tue Nov 19 09:33:52 2013 Eric Hodel <drbrain@segment7.net>
|
Tue Nov 19 09:33:52 2013 Eric Hodel <drbrain@segment7.net>
|
||||||
|
|
||||||
* lib/rubygems: Update to RubyGems master 6a3d9f9. Changes include:
|
* lib/rubygems: Update to RubyGems master 6a3d9f9. Changes include:
|
||||||
|
|
|
@ -64,7 +64,7 @@ module RDoc
|
||||||
##
|
##
|
||||||
# RDoc version you are using
|
# RDoc version you are using
|
||||||
|
|
||||||
VERSION = '4.1.0.preview.1'
|
VERSION = '4.1.0.preview.2'
|
||||||
|
|
||||||
##
|
##
|
||||||
# Method visibilities
|
# Method visibilities
|
||||||
|
|
|
@ -63,15 +63,7 @@ class RDoc::Constant < RDoc::CodeObject
|
||||||
# for a documented class or module.
|
# for a documented class or module.
|
||||||
|
|
||||||
def documented?
|
def documented?
|
||||||
return true if super
|
super or is_alias_for && is_alias_for.documented?
|
||||||
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?
|
|
||||||
end
|
end
|
||||||
|
|
||||||
##
|
##
|
||||||
|
|
|
@ -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>
|
<h2>
|
||||||
<a href="<%= rel_prefix %>/index.html" rel="home">Home</a>
|
<a href="<%= rel_prefix %>/index.html" rel="home">Home</a>
|
||||||
</h2>
|
</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#pages">Pages</a>
|
||||||
<a href="<%= rel_prefix %>/table_of_contents.html#classes">Classes</a>
|
<a href="<%= rel_prefix %>/table_of_contents.html#classes">Classes</a>
|
||||||
<a href="<%= rel_prefix %>/table_of_contents.html#methods">Methods</a>
|
<a href="<%= rel_prefix %>/table_of_contents.html#methods">Methods</a>
|
||||||
</h3>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -193,7 +193,8 @@ nav h2 {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
nav h3 {
|
nav h3,
|
||||||
|
#table-of-contents-navigation {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 2px 8px 2px 8px;
|
padding: 2px 8px 2px 8px;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
|
@ -213,8 +214,13 @@ nav p {
|
||||||
border-top: 0;
|
border-top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#home-section h2,
|
#home-section h2 {
|
||||||
#home-section h3 {
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
#table-of-contents-navigation {
|
||||||
|
font-size: 1.2em;
|
||||||
|
font-weight: bold;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -535,8 +535,8 @@ class RDoc::Markup::Parser
|
||||||
end
|
end
|
||||||
|
|
||||||
##
|
##
|
||||||
# Calculates the column (by character) and line of the current token from
|
# Calculates the column (by character) and line of the current token based
|
||||||
# +scanner+ based on +byte_offset+.
|
# on +byte_offset+.
|
||||||
|
|
||||||
def token_pos byte_offset
|
def token_pos byte_offset
|
||||||
offset = char_pos byte_offset
|
offset = char_pos byte_offset
|
||||||
|
|
|
@ -1231,8 +1231,8 @@ class RDoc::RubyLex
|
||||||
end
|
end
|
||||||
|
|
||||||
if @ltype == "/"
|
if @ltype == "/"
|
||||||
if peek(0) =~ /i|m|x|o|e|s|u|n/
|
while peek(0) =~ /i|m|x|o|e|s|u|n/
|
||||||
getc
|
str << getc
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -663,7 +663,7 @@ class RDoc::Store
|
||||||
end
|
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.
|
# a variable => class name map.
|
||||||
|
|
||||||
def make_variable_map variables
|
def make_variable_map variables
|
||||||
|
|
|
@ -219,13 +219,8 @@ class TestRDocGeneratorDarkfish < RDoc::TestCase
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
# This guard is quoted from test/ruby/test_file_exhaustive.rb
|
assert_operator File.stat(filename).nlink, :>, 1,
|
||||||
unless /emx|mswin|mingw/ =~ RUBY_PLATFORM
|
"#{filename} is not hard-linked"
|
||||||
# on Windows, nlink is always 1. but this behavior will be changed
|
|
||||||
# in the future.
|
|
||||||
assert_operator File.stat(filename).nlink, :>, 1,
|
|
||||||
"#{filename} is not hard-linked"
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -242,6 +242,26 @@ U
|
||||||
assert_equal expected, tokens
|
assert_equal expected, tokens
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_class_tokenize_regexp_options
|
||||||
|
tokens = RDoc::RubyLex.tokenize "/hAY/i", nil
|
||||||
|
|
||||||
|
expected = [
|
||||||
|
@TK::TkREGEXP.new( 0, 1, 0, "/hAY/i"),
|
||||||
|
@TK::TkNL .new( 6, 1, 6, "\n"),
|
||||||
|
]
|
||||||
|
|
||||||
|
assert_equal expected, tokens
|
||||||
|
|
||||||
|
tokens = RDoc::RubyLex.tokenize "/hAY/ix", nil
|
||||||
|
|
||||||
|
expected = [
|
||||||
|
@TK::TkREGEXP.new( 0, 1, 0, "/hAY/ix"),
|
||||||
|
@TK::TkNL .new( 7, 1, 7, "\n"),
|
||||||
|
]
|
||||||
|
|
||||||
|
assert_equal expected, tokens
|
||||||
|
end
|
||||||
|
|
||||||
def test_class_tokenize_regexp_backref
|
def test_class_tokenize_regexp_backref
|
||||||
tokens = RDoc::RubyLex.tokenize "/[csh](..) [csh]\\1 in/", nil
|
tokens = RDoc::RubyLex.tokenize "/[csh](..) [csh]\\1 in/", nil
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ class TestRDocRubygemsHook < Gem::TestCase
|
||||||
skip 'requires RubyGems 1.9+' unless
|
skip 'requires RubyGems 1.9+' unless
|
||||||
Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.9')
|
Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.9')
|
||||||
|
|
||||||
@a = util_spec 'a' do |s|
|
@a = util_spec 'a', 2 do |s|
|
||||||
s.rdoc_options = %w[--main MyTitle]
|
s.rdoc_options = %w[--main MyTitle]
|
||||||
s.extra_rdoc_files = %w[README]
|
s.extra_rdoc_files = %w[README]
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue