rdoc 6.5.1.1 → 6.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- 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/cross_reference.rb +0 -1
- data/lib/rdoc/encoding.rb +1 -6
- 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/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 +27 -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.rb +28 -9
- data/lib/rdoc/markdown.kpeg +1 -1
- data/lib/rdoc/markdown.rb +1 -1
- 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 +11 -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 +0 -1
- 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/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/to_ansi.rb +0 -1
- data/lib/rdoc/markup/to_html.rb +3 -2
- data/lib/rdoc/markup/to_html_crossref.rb +0 -1
- data/lib/rdoc/markup/to_html_snippet.rb +0 -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 +0 -1
- data/lib/rdoc/markup/to_rdoc.rb +0 -1
- 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 +3 -2
- data/lib/rdoc/parser/changelog.rb +0 -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 +1 -1
- data/lib/rdoc/parser/ruby.rb +4 -4
- data/lib/rdoc/parser/ruby_tools.rb +0 -2
- data/lib/rdoc/parser/text.rb +0 -1
- data/lib/rdoc/rd/block_parser.rb +650 -2
- data/lib/rdoc/rd/block_parser.ry +1 -1
- data/lib/rdoc/rd/inline.rb +0 -1
- data/lib/rdoc/rd/inline_parser.rb +2 -2
- data/lib/rdoc/rdoc.rb +2 -4
- data/lib/rdoc/require.rb +0 -1
- data/lib/rdoc/ri/driver.rb +9 -8
- 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 +19 -26
- data/lib/rdoc/task.rb +28 -2
- data/lib/rdoc/token_stream.rb +0 -1
- data/lib/rdoc/top_level.rb +0 -1
- data/lib/rdoc/version.rb +1 -1
- metadata +11 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 947667e0cc733b38e36c829627ea1cca454420e44124b9536bf7f6ab7c687688
|
4
|
+
data.tar.gz: ce0d8a98c383e7c6b03138fbb62a31626bb24a20be3967aefa3c29a302b0d9f6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dd6e321fe810da6ed4b5257df5347474adb514b061c9c5ad981c57feef340544e6e51fe9bfe48ef31bc7eaa87fc179883635d5448f6f2ab669443adcd6e98d46
|
7
|
+
data.tar.gz: 1c7d9158ca93ab8a913f282d6a641bc6d2f69eecf779b452d93fb935f6fde8e0e536d186ca8c2eba90a58a31ffd34cffd9af7a220fd5ff0ed63da6cf68ad8ed2
|
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/cross_reference.rb
CHANGED
data/lib/rdoc/encoding.rb
CHANGED
@@ -124,12 +124,7 @@ module RDoc::Encoding
|
|
124
124
|
if text.kind_of? RDoc::Comment
|
125
125
|
text.encode! encoding
|
126
126
|
else
|
127
|
-
|
128
|
-
if RUBY_VERSION < '2.3.0'
|
129
|
-
text.force_encoding encoding
|
130
|
-
else
|
131
|
-
String.new text, encoding: encoding
|
132
|
-
end
|
127
|
+
String.new text, encoding: encoding
|
133
128
|
end
|
134
129
|
end
|
135
130
|
|
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/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,
|
@@ -181,21 +189,25 @@ table tr:nth-child(even) td {
|
|
181
189
|
/* @group Top-Level Structure */
|
182
190
|
|
183
191
|
nav {
|
184
|
-
float: left;
|
185
|
-
width: 260px;
|
186
192
|
font-family: Helvetica, sans-serif;
|
187
193
|
font-size: 14px;
|
188
194
|
border-right: 1px solid #ccc;
|
189
195
|
position: sticky;
|
190
196
|
top: 0;
|
191
197
|
overflow: auto;
|
198
|
+
|
199
|
+
/* Layout */
|
200
|
+
width: 260px; /* fallback */
|
201
|
+
width: max(50px, 20vw);
|
202
|
+
min-width: 50px;
|
203
|
+
max-width: 80vw;
|
192
204
|
height: calc(100vh - 100px); /* reduce the footer height */
|
205
|
+
resize: horizontal;
|
193
206
|
}
|
194
207
|
|
195
208
|
main {
|
196
209
|
display: block;
|
197
|
-
margin:
|
198
|
-
padding-left: 20px;
|
210
|
+
margin: 1em;
|
199
211
|
min-width: 340px;
|
200
212
|
font-size: 16px;
|
201
213
|
}
|
@@ -214,7 +226,6 @@ main h6 {
|
|
214
226
|
}
|
215
227
|
|
216
228
|
#validator-badges {
|
217
|
-
clear: both;
|
218
229
|
margin: 1em 1em 2em;
|
219
230
|
font-size: smaller;
|
220
231
|
}
|
@@ -309,23 +320,26 @@ dl.note-list dt {
|
|
309
320
|
background: url(../images/arrow_up.png) no-repeat right center;
|
310
321
|
}
|
311
322
|
|
312
|
-
.nav-section details summary {
|
323
|
+
.nav-section details > summary {
|
313
324
|
display: block;
|
314
325
|
}
|
315
326
|
|
316
|
-
.nav-section details summary::-webkit-details-marker {
|
327
|
+
.nav-section details > summary::-webkit-details-marker {
|
317
328
|
display: none;
|
318
329
|
}
|
319
330
|
|
320
|
-
.nav-section details summary
|
331
|
+
.nav-section details > summary::before {
|
321
332
|
content: "";
|
322
333
|
}
|
323
334
|
|
324
|
-
.nav-section details summary
|
325
|
-
content: "
|
335
|
+
.nav-section details > summary::after {
|
336
|
+
content: "\25B6"; /* BLACK RIGHT-POINTING TRIANGLE */
|
337
|
+
font-size: 0.8em;
|
338
|
+
margin-left: 0.4em;
|
326
339
|
}
|
327
|
-
|
328
|
-
|
340
|
+
|
341
|
+
.nav-section details[open] > summary::after {
|
342
|
+
content: "\25BD"; /* WHITE DOWN-POINTING TRIANGLE */
|
329
343
|
}
|
330
344
|
|
331
345
|
/* @end */
|
@@ -553,7 +567,7 @@ main .method-click-advice {
|
|
553
567
|
line-height: 20px;
|
554
568
|
background: url(../images/zoom.png) no-repeat right top;
|
555
569
|
}
|
556
|
-
main .method-
|
570
|
+
main .method-header:hover .method-click-advice {
|
557
571
|
visibility: visible;
|
558
572
|
}
|
559
573
|
|
@@ -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
@@ -64,6 +64,9 @@ class RDoc::Markdown::Literals
|
|
64
64
|
def current_line(target=pos)
|
65
65
|
if line = position_line_offsets.bsearch_index {|x| x > target }
|
66
66
|
return line + 1
|
67
|
+
elsif target == string.size
|
68
|
+
past_last = !string.empty? && string[-1]=="\n" ? 1 : 0
|
69
|
+
return position_line_offsets.size + past_last
|
67
70
|
end
|
68
71
|
raise "Target position #{target} is outside of string"
|
69
72
|
end
|
@@ -71,17 +74,22 @@ class RDoc::Markdown::Literals
|
|
71
74
|
def current_line(target=pos)
|
72
75
|
if line = position_line_offsets.index {|x| x > target }
|
73
76
|
return line + 1
|
77
|
+
elsif target == string.size
|
78
|
+
past_last = !string.empty? && string[-1]=="\n" ? 1 : 0
|
79
|
+
return position_line_offsets.size + past_last
|
74
80
|
end
|
75
|
-
|
76
81
|
raise "Target position #{target} is outside of string"
|
77
82
|
end
|
78
83
|
end
|
79
84
|
|
80
85
|
def current_character(target=pos)
|
81
|
-
if target < 0 || target
|
86
|
+
if target < 0 || target > string.size
|
82
87
|
raise "Target position #{target} is outside of string"
|
88
|
+
elsif target == string.size
|
89
|
+
""
|
90
|
+
else
|
91
|
+
string[target, 1]
|
83
92
|
end
|
84
|
-
string[target, 1]
|
85
93
|
end
|
86
94
|
|
87
95
|
KpegPosInfo = Struct.new(:pos, :lno, :col, :line, :char)
|
@@ -200,6 +208,15 @@ class RDoc::Markdown::Literals
|
|
200
208
|
|
201
209
|
attr_reader :failed_rule
|
202
210
|
|
211
|
+
def match_dot()
|
212
|
+
if @pos >= @string_size
|
213
|
+
return nil
|
214
|
+
end
|
215
|
+
|
216
|
+
@pos += 1
|
217
|
+
true
|
218
|
+
end
|
219
|
+
|
203
220
|
def match_string(str)
|
204
221
|
len = str.size
|
205
222
|
if @string[pos,len] == str
|
@@ -220,24 +237,26 @@ class RDoc::Markdown::Literals
|
|
220
237
|
end
|
221
238
|
|
222
239
|
if "".respond_to? :ord
|
223
|
-
def
|
240
|
+
def match_char_range(char_range)
|
224
241
|
if @pos >= @string_size
|
225
242
|
return nil
|
243
|
+
elsif !char_range.include?(@string[@pos].ord)
|
244
|
+
return nil
|
226
245
|
end
|
227
246
|
|
228
|
-
s = @string[@pos].ord
|
229
247
|
@pos += 1
|
230
|
-
|
248
|
+
true
|
231
249
|
end
|
232
250
|
else
|
233
|
-
def
|
251
|
+
def match_char_range(char_range)
|
234
252
|
if @pos >= @string_size
|
235
253
|
return nil
|
254
|
+
elsif !char_range.include?(@string[@pos])
|
255
|
+
return nil
|
236
256
|
end
|
237
257
|
|
238
|
-
s = @string[@pos]
|
239
258
|
@pos += 1
|
240
|
-
|
259
|
+
true
|
241
260
|
end
|
242
261
|
end
|
243
262
|
|
data/lib/rdoc/markdown.kpeg
CHANGED
@@ -178,7 +178,7 @@
|
|
178
178
|
# [dingus]: http://daringfireball.net/projects/markdown/dingus
|
179
179
|
# [GFM]: https://github.github.com/gfm/
|
180
180
|
# [pegmarkdown]: https://github.com/jgm/peg-markdown
|
181
|
-
# [PHPE]:
|
181
|
+
# [PHPE]: https://michelf.ca/projects/php-markdown/extra/#def-list
|
182
182
|
# [syntax]: http://daringfireball.net/projects/markdown/syntax
|
183
183
|
#--
|
184
184
|
# Last updated to jgm/peg-markdown commit 8f8fc22ef0
|
data/lib/rdoc/markdown.rb
CHANGED
@@ -175,7 +175,7 @@
|
|
175
175
|
# [dingus]: http://daringfireball.net/projects/markdown/dingus
|
176
176
|
# [GFM]: https://github.github.com/gfm/
|
177
177
|
# [pegmarkdown]: https://github.com/jgm/peg-markdown
|
178
|
-
# [PHPE]:
|
178
|
+
# [PHPE]: https://michelf.ca/projects/php-markdown/extra/#def-list
|
179
179
|
# [syntax]: http://daringfireball.net/projects/markdown/syntax
|
180
180
|
#--
|
181
181
|
# Last updated to jgm/peg-markdown commit 8f8fc22ef0
|