rdoc 6.5.0 → 6.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CONTRIBUTING.rdoc +1 -1
- data/README.rdoc +2 -2
- data/TODO.rdoc +1 -1
- data/lib/rdoc/alias.rb +0 -1
- data/lib/rdoc/anon_class.rb +0 -1
- data/lib/rdoc/any_method.rb +15 -0
- data/lib/rdoc/attr.rb +0 -1
- data/lib/rdoc/class_module.rb +0 -1
- data/lib/rdoc/comment.rb +20 -41
- data/lib/rdoc/constant.rb +0 -1
- data/lib/rdoc/context/section.rb +0 -1
- data/lib/rdoc/context.rb +1 -1
- data/lib/rdoc/cross_reference.rb +3 -1
- data/lib/rdoc/encoding.rb +1 -17
- data/lib/rdoc/erb_partial.rb +0 -1
- data/lib/rdoc/erbio.rb +2 -7
- data/lib/rdoc/extend.rb +0 -1
- data/lib/rdoc/generator/darkfish.rb +2 -6
- data/lib/rdoc/generator/json_index.rb +2 -2
- data/lib/rdoc/generator/markup.rb +0 -1
- data/lib/rdoc/generator/pot.rb +1 -0
- data/lib/rdoc/generator/ri.rb +0 -1
- data/lib/rdoc/generator/template/darkfish/_sidebar_search.rhtml +1 -1
- data/lib/rdoc/generator/template/darkfish/class.rhtml +6 -0
- data/lib/rdoc/generator/template/darkfish/css/rdoc.css +38 -13
- data/lib/rdoc/generator/template/darkfish/js/darkfish.js +13 -0
- data/lib/rdoc/generator/template/darkfish/js/search.js +3 -3
- data/lib/rdoc/generator/template/darkfish/table_of_contents.rhtml +5 -4
- data/lib/rdoc/generator/template/json_index/js/navigation.js +8 -8
- data/lib/rdoc/ghost_method.rb +0 -1
- data/lib/rdoc/include.rb +0 -1
- data/lib/rdoc/markdown/entities.rb +0 -1
- data/lib/rdoc/markdown/literals.kpeg +0 -2
- data/lib/rdoc/markdown/literals.rb +66 -44
- data/lib/rdoc/markdown.kpeg +3 -3
- data/lib/rdoc/markdown.rb +7 -5
- data/lib/rdoc/markup/attr_changer.rb +0 -1
- data/lib/rdoc/markup/attr_span.rb +0 -1
- data/lib/rdoc/markup/attribute_manager.rb +14 -12
- data/lib/rdoc/markup/attributes.rb +0 -1
- data/lib/rdoc/markup/blank_line.rb +0 -1
- data/lib/rdoc/markup/block_quote.rb +0 -1
- data/lib/rdoc/markup/document.rb +0 -1
- data/lib/rdoc/markup/formatter.rb +1 -2
- data/lib/rdoc/markup/hard_break.rb +0 -1
- data/lib/rdoc/markup/heading.rb +0 -1
- data/lib/rdoc/markup/include.rb +0 -1
- data/lib/rdoc/markup/indented_paragraph.rb +0 -1
- data/lib/rdoc/markup/list.rb +0 -1
- data/lib/rdoc/markup/list_item.rb +0 -1
- data/lib/rdoc/markup/paragraph.rb +0 -1
- data/lib/rdoc/markup/parser.rb +5 -1
- data/lib/rdoc/markup/raw.rb +0 -1
- data/lib/rdoc/markup/regexp_handling.rb +0 -1
- data/lib/rdoc/markup/rule.rb +0 -1
- data/lib/rdoc/markup/table.rb +11 -2
- data/lib/rdoc/markup/to_ansi.rb +0 -1
- data/lib/rdoc/markup/to_bs.rb +25 -0
- data/lib/rdoc/markup/to_html.rb +7 -3
- data/lib/rdoc/markup/to_html_crossref.rb +13 -14
- data/lib/rdoc/markup/to_html_snippet.rb +3 -1
- data/lib/rdoc/markup/to_joined_paragraph.rb +2 -3
- data/lib/rdoc/markup/to_label.rb +0 -1
- data/lib/rdoc/markup/to_markdown.rb +4 -5
- data/lib/rdoc/markup/to_rdoc.rb +11 -4
- data/lib/rdoc/markup/to_table_of_contents.rb +0 -1
- data/lib/rdoc/markup/to_test.rb +0 -1
- data/lib/rdoc/markup/to_tt_only.rb +0 -1
- data/lib/rdoc/markup/verbatim.rb +0 -1
- data/lib/rdoc/meta_method.rb +0 -1
- data/lib/rdoc/method_attr.rb +0 -1
- data/lib/rdoc/mixin.rb +0 -1
- data/lib/rdoc/normal_class.rb +0 -1
- data/lib/rdoc/normal_module.rb +0 -1
- data/lib/rdoc/options.rb +4 -2
- data/lib/rdoc/parser/c.rb +33 -22
- data/lib/rdoc/parser/changelog.rb +15 -1
- data/lib/rdoc/parser/markdown.rb +0 -2
- data/lib/rdoc/parser/rd.rb +0 -1
- data/lib/rdoc/parser/ripper_state_lex.rb +11 -1
- data/lib/rdoc/parser/ruby.rb +18 -6
- data/lib/rdoc/parser/ruby_tools.rb +0 -2
- data/lib/rdoc/parser/text.rb +0 -1
- data/lib/rdoc/parser.rb +4 -2
- data/lib/rdoc/rd/block_parser.rb +650 -4
- data/lib/rdoc/rd/block_parser.ry +1 -1
- data/lib/rdoc/rd/inline.rb +0 -1
- data/lib/rdoc/rd/inline_parser.rb +649 -3
- data/lib/rdoc/rdoc.rb +2 -4
- data/lib/rdoc/require.rb +0 -1
- data/lib/rdoc/ri/driver.rb +10 -9
- data/lib/rdoc/ri/store.rb +0 -1
- data/lib/rdoc/single_class.rb +0 -1
- data/lib/rdoc/stats/quiet.rb +0 -1
- data/lib/rdoc/stats/verbose.rb +0 -2
- data/lib/rdoc/store.rb +29 -19
- data/lib/rdoc/task.rb +28 -2
- data/lib/rdoc/text.rb +10 -0
- data/lib/rdoc/token_stream.rb +1 -2
- data/lib/rdoc/top_level.rb +3 -1
- data/lib/rdoc/version.rb +1 -1
- data/lib/rdoc.rb +12 -0
- metadata +8 -8
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7b5120e82f653957d49d069e88f361f338a2db7f40bdc0756ffcea7d3bd3c4f2
|
|
4
|
+
data.tar.gz: a0f09a9246684a22992f2deff120c238b24fbe59a20dfdfa87b340fecc9ce297
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e0391b650362cb28f505eaf1d258b259debc4d828ad98643e3a27c1a16811d2bf126b40dd3f9872f4d50536e6875a4691e52c4e6d3732850150710866baf0f69
|
|
7
|
+
data.tar.gz: c8a40bfeedd964ce6b42781c1ee6c93dda1917a3333b79ebe8b886cd26a8fe49b32522a156c39c99811134fa8bd60612aface400f06641bea155d07a9de6ec2a
|
data/CONTRIBUTING.rdoc
CHANGED
|
@@ -40,7 +40,7 @@ If the tests don't pass on the first run check the {GitHub Actions page}[https:/
|
|
|
40
40
|
You can now use `rake` and `autotest` to run the tests.
|
|
41
41
|
|
|
42
42
|
Note: the `rake` command must be used first before running any tests, because
|
|
43
|
-
|
|
43
|
+
it's used to generate various parsers implemented in RDoc. Also `rake clean` is
|
|
44
44
|
helpful to delete these generated files.
|
|
45
45
|
|
|
46
46
|
== Glossary
|
data/README.rdoc
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
home :: https://github.com/ruby/rdoc
|
|
4
4
|
rdoc :: https://ruby.github.io/rdoc
|
|
5
5
|
bugs :: https://github.com/ruby/rdoc/issues
|
|
6
|
-
code quality ::
|
|
6
|
+
code quality :: https://codeclimate.com/github/ruby/rdoc
|
|
7
7
|
|
|
8
8
|
== Description
|
|
9
9
|
|
|
@@ -46,7 +46,7 @@ contain just Markup-style markup (with or without leading '#' comment
|
|
|
46
46
|
markers). If directory names are passed to RDoc, they are scanned
|
|
47
47
|
recursively for C and Ruby source files only.
|
|
48
48
|
|
|
49
|
-
To generate documentation using +rake+ see RDoc::Task[https://ruby.github.io/rdoc/
|
|
49
|
+
To generate documentation using +rake+ see RDoc::Task[https://ruby.github.io/rdoc/RDoc/Task.html].
|
|
50
50
|
|
|
51
51
|
To generate documentation programmatically:
|
|
52
52
|
|
data/TODO.rdoc
CHANGED
data/lib/rdoc/alias.rb
CHANGED
data/lib/rdoc/anon_class.rb
CHANGED
data/lib/rdoc/any_method.rb
CHANGED
|
@@ -115,6 +115,13 @@ class RDoc::AnyMethod < RDoc::MethodAttr
|
|
|
115
115
|
@call_seq = call_seq
|
|
116
116
|
end
|
|
117
117
|
|
|
118
|
+
##
|
|
119
|
+
# Whether the method has a call-seq.
|
|
120
|
+
|
|
121
|
+
def has_call_seq?
|
|
122
|
+
!!(@call_seq || is_alias_for&._call_seq)
|
|
123
|
+
end
|
|
124
|
+
|
|
118
125
|
##
|
|
119
126
|
# Loads is_alias_for from the internal name. Returns nil if the alias
|
|
120
127
|
# cannot be found.
|
|
@@ -296,6 +303,14 @@ class RDoc::AnyMethod < RDoc::MethodAttr
|
|
|
296
303
|
params
|
|
297
304
|
end
|
|
298
305
|
|
|
306
|
+
##
|
|
307
|
+
# Whether to skip the method description, true for methods that have
|
|
308
|
+
# aliases with a call-seq that doesn't include the method name.
|
|
309
|
+
|
|
310
|
+
def skip_description?
|
|
311
|
+
has_call_seq? && call_seq.nil? && !!(is_alias_for || !aliases.empty?)
|
|
312
|
+
end
|
|
313
|
+
|
|
299
314
|
##
|
|
300
315
|
# Sets the store for this method and its referenced code objects.
|
|
301
316
|
|
data/lib/rdoc/attr.rb
CHANGED
data/lib/rdoc/class_module.rb
CHANGED
data/lib/rdoc/comment.rb
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
# Each comment may have a different markup format set by #format=. By default
|
|
7
7
|
# 'rdoc' is used. The :markup: directive tells RDoc which format to use.
|
|
8
8
|
#
|
|
9
|
-
# See RDoc::
|
|
10
|
-
|
|
9
|
+
# See RDoc::MarkupReference@Directive+for+Specifying+RDoc+Source+Format.
|
|
10
|
+
|
|
11
11
|
|
|
12
12
|
class RDoc::Comment
|
|
13
13
|
|
|
@@ -97,42 +97,26 @@ class RDoc::Comment
|
|
|
97
97
|
# comment. The difficulty is to make sure not to match lines starting
|
|
98
98
|
# with ARGF at the same indent, but that are after the first description
|
|
99
99
|
# paragraph.
|
|
100
|
-
if
|
|
100
|
+
if /^(?<S> ((?!\n)\s)*+ (?# whitespaces except newline))
|
|
101
|
+
:?call-seq:
|
|
102
|
+
(?<B> \g<S>(?<N>\n|\z) (?# trailing spaces))?
|
|
103
|
+
(?<seq>
|
|
104
|
+
(\g<S>(?!\w)\S.*\g<N>)*
|
|
105
|
+
(?>
|
|
106
|
+
(?<H> \g<S>\w+ (?# ' # ARGF' in the example above))
|
|
107
|
+
.*\g<N>)?
|
|
108
|
+
(\g<S>\S.*\g<N> (?# other non-blank line))*+
|
|
109
|
+
(\g<B>+(\k<H>.*\g<N> (?# ARGF.to_a lines))++)*+
|
|
110
|
+
)
|
|
111
|
+
(?m:^\s*$|\z)
|
|
112
|
+
/x =~ @text
|
|
113
|
+
seq = $~[:seq]
|
|
114
|
+
|
|
101
115
|
all_start, all_stop = $~.offset(0)
|
|
102
|
-
seq_start, seq_stop = $~.offset(1)
|
|
103
|
-
|
|
104
|
-
# we get the following lines that start with the leading word at the
|
|
105
|
-
# same indent, even if they have blank lines before
|
|
106
|
-
if $1 =~ /(^\s*\n)+^(\s*\w+)/m then
|
|
107
|
-
leading = $2 # ' * ARGF' in the example above
|
|
108
|
-
re = %r%
|
|
109
|
-
\A(
|
|
110
|
-
(^\s*\n)+
|
|
111
|
-
(^#{Regexp.escape leading}.*?\n)+
|
|
112
|
-
)+
|
|
113
|
-
^\s*$
|
|
114
|
-
%xm
|
|
115
|
-
|
|
116
|
-
if @text[seq_stop..-1] =~ re then
|
|
117
|
-
all_stop = seq_stop + $~.offset(0).last
|
|
118
|
-
seq_stop = seq_stop + $~.offset(1).last
|
|
119
|
-
end
|
|
120
|
-
end
|
|
121
|
-
|
|
122
|
-
seq = @text[seq_start..seq_stop]
|
|
123
|
-
seq.gsub!(/^\s*(\S|\n)/m, '\1')
|
|
124
116
|
@text.slice! all_start...all_stop
|
|
125
117
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
else
|
|
129
|
-
regexp = /^\s*:?call-seq:(.*?)(^\s*$|\z)/m
|
|
130
|
-
if regexp =~ @text then
|
|
131
|
-
@text = @text.sub(regexp, '')
|
|
132
|
-
seq = $1
|
|
133
|
-
seq.gsub!(/^\s*/, '')
|
|
134
|
-
method.call_seq = seq
|
|
135
|
-
end
|
|
118
|
+
seq.gsub!(/^\s*/, '')
|
|
119
|
+
method.call_seq = seq
|
|
136
120
|
end
|
|
137
121
|
|
|
138
122
|
method
|
|
@@ -149,12 +133,7 @@ class RDoc::Comment
|
|
|
149
133
|
# HACK dubious
|
|
150
134
|
|
|
151
135
|
def encode! encoding
|
|
152
|
-
|
|
153
|
-
if RUBY_VERSION < '2.3.0'
|
|
154
|
-
@text = @text.force_encoding encoding
|
|
155
|
-
else
|
|
156
|
-
@text = String.new @text, encoding: encoding
|
|
157
|
-
end
|
|
136
|
+
@text = String.new @text, encoding: encoding
|
|
158
137
|
self
|
|
159
138
|
end
|
|
160
139
|
|
data/lib/rdoc/constant.rb
CHANGED
data/lib/rdoc/context/section.rb
CHANGED
data/lib/rdoc/context.rb
CHANGED
data/lib/rdoc/cross_reference.rb
CHANGED
data/lib/rdoc/encoding.rb
CHANGED
|
@@ -86,17 +86,6 @@ module RDoc::Encoding
|
|
|
86
86
|
nil
|
|
87
87
|
end
|
|
88
88
|
|
|
89
|
-
def self.remove_frozen_string_literal string
|
|
90
|
-
string =~ /\A(?:#!.*\n)?(.*\n)/
|
|
91
|
-
first_line = $1
|
|
92
|
-
|
|
93
|
-
if first_line =~ /\A# +frozen[-_]string[-_]literal[=:].+$/i
|
|
94
|
-
string = string.sub first_line, ''
|
|
95
|
-
end
|
|
96
|
-
|
|
97
|
-
string
|
|
98
|
-
end
|
|
99
|
-
|
|
100
89
|
##
|
|
101
90
|
# Detects the encoding of +string+ based on the magic comment
|
|
102
91
|
|
|
@@ -124,12 +113,7 @@ module RDoc::Encoding
|
|
|
124
113
|
if text.kind_of? RDoc::Comment
|
|
125
114
|
text.encode! encoding
|
|
126
115
|
else
|
|
127
|
-
|
|
128
|
-
if RUBY_VERSION < '2.3.0'
|
|
129
|
-
text.force_encoding encoding
|
|
130
|
-
else
|
|
131
|
-
String.new text, encoding: encoding
|
|
132
|
-
end
|
|
116
|
+
String.new text, encoding: encoding
|
|
133
117
|
end
|
|
134
118
|
end
|
|
135
119
|
|
data/lib/rdoc/erb_partial.rb
CHANGED
data/lib/rdoc/erbio.rb
CHANGED
|
@@ -20,12 +20,8 @@ class RDoc::ERBIO < ERB
|
|
|
20
20
|
##
|
|
21
21
|
# Defaults +eoutvar+ to 'io', otherwise is identical to ERB's initialize
|
|
22
22
|
|
|
23
|
-
def initialize str,
|
|
24
|
-
|
|
25
|
-
super(str, trim_mode: trim_mode, eoutvar: eoutvar)
|
|
26
|
-
else
|
|
27
|
-
super(str, safe_level, legacy_trim_mode, legacy_eoutvar)
|
|
28
|
-
end
|
|
23
|
+
def initialize str, trim_mode: nil, eoutvar: 'io'
|
|
24
|
+
super(str, trim_mode: trim_mode, eoutvar: eoutvar)
|
|
29
25
|
end
|
|
30
26
|
|
|
31
27
|
##
|
|
@@ -39,4 +35,3 @@ class RDoc::ERBIO < ERB
|
|
|
39
35
|
end
|
|
40
36
|
|
|
41
37
|
end
|
|
42
|
-
|
data/lib/rdoc/extend.rb
CHANGED
|
@@ -610,7 +610,7 @@ class RDoc::Generator::Darkfish
|
|
|
610
610
|
|
|
611
611
|
@classes = @store.all_classes_and_modules.sort
|
|
612
612
|
@files = @store.all_files.sort
|
|
613
|
-
@methods = @classes.
|
|
613
|
+
@methods = @classes.flat_map { |m| m.method_list }.sort
|
|
614
614
|
@modsort = get_sorted_module_list @classes
|
|
615
615
|
end
|
|
616
616
|
|
|
@@ -778,11 +778,7 @@ class RDoc::Generator::Darkfish
|
|
|
778
778
|
erbout = "_erbout_#{file_var}"
|
|
779
779
|
end
|
|
780
780
|
|
|
781
|
-
|
|
782
|
-
template = klass.new template, trim_mode: '-', eoutvar: erbout
|
|
783
|
-
else
|
|
784
|
-
template = klass.new template, nil, '-', erbout
|
|
785
|
-
end
|
|
781
|
+
template = klass.new template, trim_mode: '-', eoutvar: erbout
|
|
786
782
|
@template_cache[file] = template
|
|
787
783
|
template
|
|
788
784
|
end
|
|
@@ -230,9 +230,9 @@ class RDoc::Generator::JsonIndex
|
|
|
230
230
|
def index_methods
|
|
231
231
|
debug_msg " generating method search index"
|
|
232
232
|
|
|
233
|
-
list = @classes.uniq.
|
|
233
|
+
list = @classes.uniq.flat_map do |klass|
|
|
234
234
|
klass.method_list
|
|
235
|
-
end.
|
|
235
|
+
end.sort_by do |method|
|
|
236
236
|
[method.name, method.parent.full_name]
|
|
237
237
|
end
|
|
238
238
|
|
data/lib/rdoc/generator/pot.rb
CHANGED
data/lib/rdoc/generator/ri.rb
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<div id="search-field-wrapper">
|
|
4
4
|
<input id="search-field" role="combobox" aria-label="Search"
|
|
5
5
|
aria-autocomplete="list" aria-controls="search-results"
|
|
6
|
-
type="text" name="search" placeholder="Search" spellcheck="false"
|
|
6
|
+
type="text" name="search" placeholder="Search (/) for a class, method, ..." spellcheck="false"
|
|
7
7
|
title="Type to search, Up and Down to navigate, Enter to load">
|
|
8
8
|
</div>
|
|
9
9
|
|
|
@@ -112,6 +112,10 @@
|
|
|
112
112
|
<%- end -%>
|
|
113
113
|
</div>
|
|
114
114
|
<%- end -%>
|
|
115
|
+
<%- elsif method.has_call_seq? then -%>
|
|
116
|
+
<div class="method-heading">
|
|
117
|
+
<span class="method-name"><%= h method.name %></span>
|
|
118
|
+
</div>
|
|
115
119
|
<%- else -%>
|
|
116
120
|
<div class="method-heading">
|
|
117
121
|
<span class="method-name"><%= h method.name %></span><span
|
|
@@ -123,6 +127,7 @@
|
|
|
123
127
|
<%- end -%>
|
|
124
128
|
</div>
|
|
125
129
|
|
|
130
|
+
<%- unless method.skip_description? then -%>
|
|
126
131
|
<div class="method-description">
|
|
127
132
|
<%- if method.comment then -%>
|
|
128
133
|
<%= method.description.strip %>
|
|
@@ -145,6 +150,7 @@
|
|
|
145
150
|
</div>
|
|
146
151
|
<%- end -%>
|
|
147
152
|
</div>
|
|
153
|
+
<%- end -%>
|
|
148
154
|
|
|
149
155
|
<%- unless method.aliases.empty? then -%>
|
|
150
156
|
<div class="aliases">
|
|
@@ -17,6 +17,14 @@ body {
|
|
|
17
17
|
background: #fafafa;
|
|
18
18
|
font-family: Lato, sans-serif;
|
|
19
19
|
font-weight: 300;
|
|
20
|
+
|
|
21
|
+
/* Layout */
|
|
22
|
+
display: grid;
|
|
23
|
+
grid-template-columns: auto 1fr;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
body > :last-child {
|
|
27
|
+
grid-column: 1 / 3;
|
|
20
28
|
}
|
|
21
29
|
|
|
22
30
|
h1 span,
|
|
@@ -79,6 +87,17 @@ pre {
|
|
|
79
87
|
border-radius: 0.2em;
|
|
80
88
|
}
|
|
81
89
|
|
|
90
|
+
em {
|
|
91
|
+
text-decoration-color: rgba(52, 48, 64, 0.25);
|
|
92
|
+
text-decoration-line: underline;
|
|
93
|
+
text-decoration-style: dotted;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
strong,
|
|
97
|
+
em {
|
|
98
|
+
background-color: rgba(158, 178, 255, 0.1);
|
|
99
|
+
}
|
|
100
|
+
|
|
82
101
|
table {
|
|
83
102
|
margin: 0;
|
|
84
103
|
border-spacing: 0;
|
|
@@ -181,21 +200,25 @@ table tr:nth-child(even) td {
|
|
|
181
200
|
/* @group Top-Level Structure */
|
|
182
201
|
|
|
183
202
|
nav {
|
|
184
|
-
float: left;
|
|
185
|
-
width: 260px;
|
|
186
203
|
font-family: Helvetica, sans-serif;
|
|
187
204
|
font-size: 14px;
|
|
188
205
|
border-right: 1px solid #ccc;
|
|
189
206
|
position: sticky;
|
|
190
207
|
top: 0;
|
|
191
208
|
overflow: auto;
|
|
209
|
+
|
|
210
|
+
/* Layout */
|
|
211
|
+
width: 260px; /* fallback */
|
|
212
|
+
width: max(50px, 20vw);
|
|
213
|
+
min-width: 50px;
|
|
214
|
+
max-width: 80vw;
|
|
192
215
|
height: calc(100vh - 100px); /* reduce the footer height */
|
|
216
|
+
resize: horizontal;
|
|
193
217
|
}
|
|
194
218
|
|
|
195
219
|
main {
|
|
196
220
|
display: block;
|
|
197
|
-
margin:
|
|
198
|
-
padding-left: 20px;
|
|
221
|
+
margin: 1em;
|
|
199
222
|
min-width: 340px;
|
|
200
223
|
font-size: 16px;
|
|
201
224
|
}
|
|
@@ -214,7 +237,6 @@ main h6 {
|
|
|
214
237
|
}
|
|
215
238
|
|
|
216
239
|
#validator-badges {
|
|
217
|
-
clear: both;
|
|
218
240
|
margin: 1em 1em 2em;
|
|
219
241
|
font-size: smaller;
|
|
220
242
|
}
|
|
@@ -309,23 +331,26 @@ dl.note-list dt {
|
|
|
309
331
|
background: url(../images/arrow_up.png) no-repeat right center;
|
|
310
332
|
}
|
|
311
333
|
|
|
312
|
-
.nav-section details summary {
|
|
334
|
+
.nav-section details > summary {
|
|
313
335
|
display: block;
|
|
314
336
|
}
|
|
315
337
|
|
|
316
|
-
.nav-section details summary::-webkit-details-marker {
|
|
338
|
+
.nav-section details > summary::-webkit-details-marker {
|
|
317
339
|
display: none;
|
|
318
340
|
}
|
|
319
341
|
|
|
320
|
-
.nav-section details summary
|
|
342
|
+
.nav-section details > summary::before {
|
|
321
343
|
content: "";
|
|
322
344
|
}
|
|
323
345
|
|
|
324
|
-
.nav-section details summary
|
|
325
|
-
content: "
|
|
346
|
+
.nav-section details > summary::after {
|
|
347
|
+
content: "\25B6"; /* BLACK RIGHT-POINTING TRIANGLE */
|
|
348
|
+
font-size: 0.8em;
|
|
349
|
+
margin-left: 0.4em;
|
|
326
350
|
}
|
|
327
|
-
|
|
328
|
-
|
|
351
|
+
|
|
352
|
+
.nav-section details[open] > summary::after {
|
|
353
|
+
content: "\25BD"; /* WHITE DOWN-POINTING TRIANGLE */
|
|
329
354
|
}
|
|
330
355
|
|
|
331
356
|
/* @end */
|
|
@@ -553,7 +578,7 @@ main .method-click-advice {
|
|
|
553
578
|
line-height: 20px;
|
|
554
579
|
background: url(../images/zoom.png) no-repeat right top;
|
|
555
580
|
}
|
|
556
|
-
main .method-
|
|
581
|
+
main .method-header:hover .method-click-advice {
|
|
557
582
|
visibility: visible;
|
|
558
583
|
}
|
|
559
584
|
|
|
@@ -78,7 +78,20 @@ function hookSearch() {
|
|
|
78
78
|
search.scrollIntoView = search.scrollInWindow;
|
|
79
79
|
};
|
|
80
80
|
|
|
81
|
+
function hookFocus() {
|
|
82
|
+
document.addEventListener("keydown", (event) => {
|
|
83
|
+
if (document.activeElement.tagName === 'INPUT') {
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
if (event.key === "/") {
|
|
87
|
+
event.preventDefault();
|
|
88
|
+
document.querySelector('#search-field').focus();
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
|
|
81
93
|
document.addEventListener('DOMContentLoaded', function() {
|
|
82
94
|
hookSourceViews();
|
|
83
95
|
hookSearch();
|
|
96
|
+
hookFocus();
|
|
84
97
|
});
|
|
@@ -15,9 +15,9 @@ Search.prototype = Object.assign({}, Navigation, new function() {
|
|
|
15
15
|
this.init = function() {
|
|
16
16
|
var _this = this;
|
|
17
17
|
var observer = function(e) {
|
|
18
|
-
switch(e.
|
|
19
|
-
case
|
|
20
|
-
case
|
|
18
|
+
switch(e.key) {
|
|
19
|
+
case 'ArrowUp':
|
|
20
|
+
case 'ArrowDown':
|
|
21
21
|
return;
|
|
22
22
|
}
|
|
23
23
|
_this.search(_this.input.value);
|
|
@@ -36,8 +36,9 @@
|
|
|
36
36
|
unless table.empty? then %>
|
|
37
37
|
<ul>
|
|
38
38
|
<%- table.each do |item| -%>
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
<%- label = item.respond_to?(:label) ? item.label(klass) : item.aref -%>
|
|
40
|
+
<li><a href="<%= klass.path %>#<%= label %>"><%= item.plain_html %></a>
|
|
41
|
+
<%- end -%>
|
|
41
42
|
</ul>
|
|
42
43
|
<%- end -%>
|
|
43
44
|
</li>
|
|
@@ -46,9 +47,9 @@
|
|
|
46
47
|
|
|
47
48
|
<h2 id="methods">Methods</h2>
|
|
48
49
|
<ul>
|
|
49
|
-
<%- @store.all_classes_and_modules.
|
|
50
|
+
<%- @store.all_classes_and_modules.flat_map do |mod|
|
|
50
51
|
mod.method_list
|
|
51
|
-
end.
|
|
52
|
+
end.sort.each do |method| %>
|
|
52
53
|
<li class="method">
|
|
53
54
|
<a href="<%= method.path %>"><%= h method.pretty_name %></a>
|
|
54
55
|
—
|
|
@@ -23,24 +23,24 @@ Navigation = new function() {
|
|
|
23
23
|
|
|
24
24
|
this.onkeydown = function(e) {
|
|
25
25
|
if (!this.navigationActive) return;
|
|
26
|
-
switch(e.
|
|
27
|
-
case
|
|
26
|
+
switch(e.key) {
|
|
27
|
+
case 'ArrowLeft':
|
|
28
28
|
if (this.moveLeft()) e.preventDefault();
|
|
29
29
|
break;
|
|
30
|
-
case
|
|
31
|
-
if (e.
|
|
30
|
+
case 'ArrowUp':
|
|
31
|
+
if (e.key == 'ArrowUp' || e.ctrlKey) {
|
|
32
32
|
if (this.moveUp()) e.preventDefault();
|
|
33
33
|
}
|
|
34
34
|
break;
|
|
35
|
-
case
|
|
35
|
+
case 'ArrowRight':
|
|
36
36
|
if (this.moveRight()) e.preventDefault();
|
|
37
37
|
break;
|
|
38
|
-
case
|
|
39
|
-
if (e.
|
|
38
|
+
case 'ArrowDown':
|
|
39
|
+
if (e.key == 'ArrowDown' || e.ctrlKey) {
|
|
40
40
|
if (this.moveDown()) e.preventDefault();
|
|
41
41
|
}
|
|
42
42
|
break;
|
|
43
|
-
case
|
|
43
|
+
case 'Enter':
|
|
44
44
|
if (this.current) e.preventDefault();
|
|
45
45
|
this.select(this.current);
|
|
46
46
|
break;
|
data/lib/rdoc/ghost_method.rb
CHANGED
data/lib/rdoc/include.rb
CHANGED
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
# :markup: markdown
|
|
7
7
|
|
|
8
8
|
##
|
|
9
|
-
#--
|
|
10
9
|
# This set of literals is for Ruby 1.9 regular expressions and gives full
|
|
11
10
|
# unicode support.
|
|
12
11
|
#
|
|
@@ -20,4 +19,3 @@ BOM = "\uFEFF"
|
|
|
20
19
|
Newline = /\n|\r\n?|\p{Zl}|\p{Zp}/
|
|
21
20
|
NonAlphanumeric = /\p{^Word}/
|
|
22
21
|
Spacechar = /\t|\p{Zs}/
|
|
23
|
-
|