rdoc 6.8.1 → 6.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rdoc/code_object/class_module.rb +14 -1
- data/lib/rdoc/code_object/method_attr.rb +14 -2
- data/lib/rdoc/generator/template/darkfish/css/rdoc.css +19 -3
- data/lib/rdoc/markup/pre_process.rb +17 -0
- data/lib/rdoc/markup/to_html.rb +1 -1
- data/lib/rdoc/parser/c.rb +19 -0
- data/lib/rdoc/parser/prism_ruby.rb +1026 -0
- data/lib/rdoc/rd/block_parser.rb +3 -3
- data/lib/rdoc/rd/inline_parser.rb +3 -3
- data/lib/rdoc/rdoc.rb +3 -1
- data/lib/rdoc/ri/driver.rb +48 -8
- data/lib/rdoc/rubygems_hook.rb +69 -6
- data/lib/rdoc/store.rb +12 -0
- data/lib/rdoc/version.rb +1 -1
- data/lib/rdoc.rb +0 -2
- data/lib/rubygems_plugin.rb +23 -0
- metadata +4 -4
- data/lib/rdoc/generator/template/darkfish/.document +0 -0
- data/lib/rdoc/generator/template/json_index/.document +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e8d7aec4fc5f30f9f33ef7dccb85f885775137d9fdea7993823ac93c322a6214
|
4
|
+
data.tar.gz: 5f3636164c89b6a183e9d6598a4633148b8e311f1344a04c6f331c17b8b5b3fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6d6744cd8cce25be176b36df564646a41656c60ff0a4f6d581748b8300ca8960a14c46f3f14e478c4b6fa9c9c1cfbd12a3fcb25f624637b01473e885a51127bc
|
7
|
+
data.tar.gz: e4f917825bbed2f768ed8ad28db175b67d37a9919fde1fe4e4383f150ff83d22a49c180874506fecab223e5b892d88a066b327d7edb4bf699e6295adb56adf69
|
@@ -705,10 +705,23 @@ class RDoc::ClassModule < RDoc::Context
|
|
705
705
|
|
706
706
|
##
|
707
707
|
# Set the superclass of this class to +superclass+
|
708
|
+
#
|
709
|
+
# where +superclass+ is one of:
|
710
|
+
#
|
711
|
+
# - +nil+
|
712
|
+
# - a String containing the full name of the superclass
|
713
|
+
# - the RDoc::ClassModule representing the superclass
|
708
714
|
|
709
715
|
def superclass=(superclass)
|
710
716
|
raise NoMethodError, "#{full_name} is a module" if module?
|
711
|
-
|
717
|
+
case superclass
|
718
|
+
when RDoc::ClassModule
|
719
|
+
@superclass = superclass.full_name
|
720
|
+
when nil, String
|
721
|
+
@superclass = superclass
|
722
|
+
else
|
723
|
+
raise TypeError, "superclass must be a String or RDoc::ClassModule, not #{superclass.class}"
|
724
|
+
end
|
712
725
|
end
|
713
726
|
|
714
727
|
##
|
@@ -114,8 +114,8 @@ class RDoc::MethodAttr < RDoc::CodeObject
|
|
114
114
|
return unless other.respond_to?(:singleton) &&
|
115
115
|
other.respond_to?(:name)
|
116
116
|
|
117
|
-
[
|
118
|
-
[other.singleton ? 0 : 1, other.name]
|
117
|
+
[@singleton ? 0 : 1, name_ord_range, name] <=>
|
118
|
+
[other.singleton ? 0 : 1, other.name_ord_range, other.name]
|
119
119
|
end
|
120
120
|
|
121
121
|
def == other # :nodoc:
|
@@ -415,4 +415,16 @@ class RDoc::MethodAttr < RDoc::CodeObject
|
|
415
415
|
end
|
416
416
|
end
|
417
417
|
|
418
|
+
def name_ord_range # :nodoc:
|
419
|
+
case name.ord
|
420
|
+
when 0..64 # anything below "A"
|
421
|
+
1
|
422
|
+
when 91..96 # the symbols between "Z" and "a"
|
423
|
+
2
|
424
|
+
when 123..126 # 7-bit symbols above "z": "{", "|", "}", "~"
|
425
|
+
3
|
426
|
+
else # everythig else can be sorted as normal
|
427
|
+
4
|
428
|
+
end
|
429
|
+
end
|
418
430
|
end
|
@@ -469,14 +469,30 @@ main dl {
|
|
469
469
|
}
|
470
470
|
|
471
471
|
main dt {
|
472
|
-
|
472
|
+
line-height: 1.5; /* matches `main p` */
|
473
|
+
font-weight: bold;
|
474
|
+
}
|
475
|
+
|
476
|
+
main dl.note-list dt {
|
473
477
|
margin-right: 1em;
|
474
478
|
float: left;
|
475
|
-
|
479
|
+
}
|
480
|
+
|
481
|
+
main dl.note-list dt:has(+ dt) {
|
482
|
+
margin-right: 0.25em;
|
483
|
+
}
|
484
|
+
|
485
|
+
main dl.note-list dt:has(+ dt)::after {
|
486
|
+
content: ', ';
|
487
|
+
font-weight: normal;
|
476
488
|
}
|
477
489
|
|
478
490
|
main dd {
|
479
|
-
margin: 0 1em 1em
|
491
|
+
margin: 0 0 1em 1em;
|
492
|
+
}
|
493
|
+
|
494
|
+
main dd p:first-child {
|
495
|
+
margin-top: 0;
|
480
496
|
}
|
481
497
|
|
482
498
|
/* Headers within Main */
|
@@ -187,6 +187,14 @@ class RDoc::Markup::PreProcess
|
|
187
187
|
include_file filename, prefix, encoding
|
188
188
|
when 'main' then
|
189
189
|
@options.main_page = param if @options.respond_to? :main_page
|
190
|
+
warn <<~MSG
|
191
|
+
The :main: directive is deprecated and will be removed in RDoc 7.
|
192
|
+
|
193
|
+
You can use these options to specify the initial page displayed instead:
|
194
|
+
- `--main=#{param}` via the command line
|
195
|
+
- `rdoc.main = "#{param}"` if you use `RDoc::Task`
|
196
|
+
- `main_page: #{param}` in your `.rdoc_options` file
|
197
|
+
MSG
|
190
198
|
|
191
199
|
blankline
|
192
200
|
when 'nodoc' then
|
@@ -217,6 +225,15 @@ class RDoc::Markup::PreProcess
|
|
217
225
|
when 'title' then
|
218
226
|
@options.default_title = param if @options.respond_to? :default_title=
|
219
227
|
|
228
|
+
warn <<~MSG
|
229
|
+
The :title: directive is deprecated and will be removed in RDoc 7.
|
230
|
+
|
231
|
+
You can use these options to specify the title displayed instead:
|
232
|
+
- `--title=#{param}` via the command line
|
233
|
+
- `rdoc.title = "#{param}"` if you use `RDoc::Task`
|
234
|
+
- `title: #{param}` in your `.rdoc_options` file
|
235
|
+
MSG
|
236
|
+
|
220
237
|
blankline
|
221
238
|
when 'yield', 'yields' then
|
222
239
|
return blankline unless code_object
|
data/lib/rdoc/markup/to_html.rb
CHANGED
@@ -407,7 +407,7 @@ class RDoc::Markup::ToHtml < RDoc::Markup::Formatter
|
|
407
407
|
"<li>"
|
408
408
|
when :LABEL, :NOTE then
|
409
409
|
Array(list_item.label).map do |label|
|
410
|
-
"<dt>#{to_html label}
|
410
|
+
"<dt>#{to_html label}</dt>\n"
|
411
411
|
end.join << "<dd>"
|
412
412
|
else
|
413
413
|
raise RDoc::Error, "Invalid list type: #{list_type.inspect}"
|
data/lib/rdoc/parser/c.rb
CHANGED
@@ -1097,15 +1097,34 @@ class RDoc::Parser::C < RDoc::Parser
|
|
1097
1097
|
# */
|
1098
1098
|
#
|
1099
1099
|
# This method modifies the +comment+
|
1100
|
+
# Both :main: and :title: directives are deprecated and will be removed in RDoc 7.
|
1100
1101
|
|
1101
1102
|
def look_for_directives_in context, comment
|
1102
1103
|
@preprocess.handle comment, context do |directive, param|
|
1103
1104
|
case directive
|
1104
1105
|
when 'main' then
|
1105
1106
|
@options.main_page = param
|
1107
|
+
|
1108
|
+
warn <<~MSG
|
1109
|
+
The :main: directive is deprecated and will be removed in RDoc 7.
|
1110
|
+
|
1111
|
+
You can use these options to specify the initial page displayed instead:
|
1112
|
+
- `--main=#{param}` via the command line
|
1113
|
+
- `rdoc.main = "#{param}"` if you use `RDoc::Task`
|
1114
|
+
- `main_page: #{param}` in your `.rdoc_options` file
|
1115
|
+
MSG
|
1106
1116
|
''
|
1107
1117
|
when 'title' then
|
1108
1118
|
@options.default_title = param if @options.respond_to? :default_title=
|
1119
|
+
|
1120
|
+
warn <<~MSG
|
1121
|
+
The :title: directive is deprecated and will be removed in RDoc 7.
|
1122
|
+
|
1123
|
+
You can use these options to specify the title displayed instead:
|
1124
|
+
- `--title=#{param}` via the command line
|
1125
|
+
- `rdoc.title = "#{param}"` if you use `RDoc::Task`
|
1126
|
+
- `title: #{param}` in your `.rdoc_options` file
|
1127
|
+
MSG
|
1109
1128
|
''
|
1110
1129
|
end
|
1111
1130
|
end
|