rdoc 3.9 → 3.9.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of rdoc might be problematic. Click here for more details.
- data.tar.gz.sig +0 -0
- data/History.txt +8 -0
- data/lib/rdoc.rb +1 -1
- data/lib/rdoc/markup/parser.rb +12 -5
- data/lib/rdoc/markup/to_html_crossref.rb +1 -1
- data/lib/rdoc/text.rb +1 -1
- data/test/test_rdoc_markup_parser.rb +34 -0
- data/test/test_rdoc_markup_to_html_crossref.rb +8 -0
- metadata +4 -3
- metadata.gz.sig +0 -0
data.tar.gz.sig
CHANGED
Binary file
|
data/History.txt
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
=== 3.9.1 / ??
|
2
|
+
|
3
|
+
* Bug fixes
|
4
|
+
* Fix RDoc::Markup parser for a header followed by a non-text token. Issue
|
5
|
+
#56 by Adam Tait
|
6
|
+
* Fix RDoc::Markup::ToHtmlCrossref#gen_url for non-<tt>rdoc-ref</tt> links.
|
7
|
+
* Fix bug report URL when rdoc crashes.
|
8
|
+
|
1
9
|
=== 3.9 / 2011-07-30
|
2
10
|
|
3
11
|
* Minor enhancements
|
data/lib/rdoc.rb
CHANGED
data/lib/rdoc/markup/parser.rb
CHANGED
@@ -86,11 +86,18 @@ class RDoc::Markup::Parser
|
|
86
86
|
# Builds a Heading of +level+
|
87
87
|
|
88
88
|
def build_heading level
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
89
|
+
type, text, = get
|
90
|
+
|
91
|
+
text = case type
|
92
|
+
when :TEXT then
|
93
|
+
skip :NEWLINE
|
94
|
+
text
|
95
|
+
else
|
96
|
+
unget
|
97
|
+
''
|
98
|
+
end
|
99
|
+
|
100
|
+
RDoc::Markup::Heading.new level, text
|
94
101
|
end
|
95
102
|
|
96
103
|
##
|
@@ -97,7 +97,7 @@ class RDoc::Markup::ToHtmlCrossref < RDoc::Markup::ToHtml
|
|
97
97
|
# RDoc::Markup::ToHtml to handle other schemes.
|
98
98
|
|
99
99
|
def gen_url url, text
|
100
|
-
super unless url =~ /\Ardoc-ref:/
|
100
|
+
return super unless url =~ /\Ardoc-ref:/
|
101
101
|
|
102
102
|
cross_reference $', text
|
103
103
|
end
|
data/lib/rdoc/text.rb
CHANGED
@@ -126,7 +126,7 @@ Ruby #{RUBY_VERSION}-p#{RUBY_PATCHLEVEL} #{RUBY_RELEASE_DATE}
|
|
126
126
|
|
127
127
|
Please file a bug report with the above information at:
|
128
128
|
|
129
|
-
|
129
|
+
https://github.com/rdoc/rdoc/issues
|
130
130
|
|
131
131
|
EOF
|
132
132
|
raise
|
@@ -248,6 +248,23 @@ the time
|
|
248
248
|
assert_equal expected, @RMP.parse(str).parts
|
249
249
|
end
|
250
250
|
|
251
|
+
def test_parse_heading_empty
|
252
|
+
str = <<-STR
|
253
|
+
===
|
254
|
+
* bullet
|
255
|
+
STR
|
256
|
+
|
257
|
+
expected = [
|
258
|
+
@RM::Heading.new(3, ''),
|
259
|
+
@RM::BlankLine.new,
|
260
|
+
@RM::List.new(:BULLET, *[
|
261
|
+
@RM::ListItem.new(nil,
|
262
|
+
@RM::Paragraph.new('bullet'))]),
|
263
|
+
]
|
264
|
+
|
265
|
+
assert_equal expected, @RMP.parse(str).parts
|
266
|
+
end
|
267
|
+
|
251
268
|
def test_parse_heading_heading
|
252
269
|
str = '= ='
|
253
270
|
|
@@ -1085,6 +1102,23 @@ the time
|
|
1085
1102
|
assert_equal expected, @RMP.tokenize(str)
|
1086
1103
|
end
|
1087
1104
|
|
1105
|
+
def test_tokenize_heading_empty
|
1106
|
+
str = <<-STR
|
1107
|
+
===
|
1108
|
+
* bullet
|
1109
|
+
STR
|
1110
|
+
|
1111
|
+
expected = [
|
1112
|
+
[:HEADER, 3, 0, 0],
|
1113
|
+
[:NEWLINE, "\n", 3, 0],
|
1114
|
+
[:BULLET, "*", 0, 1],
|
1115
|
+
[:TEXT, "bullet", 2, 1],
|
1116
|
+
[:NEWLINE, "\n", 8, 1],
|
1117
|
+
]
|
1118
|
+
|
1119
|
+
assert_equal expected, @RMP.tokenize(str)
|
1120
|
+
end
|
1121
|
+
|
1088
1122
|
def test_tokenize_heading_heading
|
1089
1123
|
str = <<-STR
|
1090
1124
|
= =
|
@@ -25,6 +25,14 @@ class TestRDocMarkupToHtmlCrossref < XrefTestCase
|
|
25
25
|
assert_equal "\n<p><a href=\"C1.html\">C1</a></p>\n", result
|
26
26
|
end
|
27
27
|
|
28
|
+
def test_gen_url
|
29
|
+
assert_equal '<a href="C1.html">Some class</a>',
|
30
|
+
@to.gen_url('rdoc-ref:C1', 'Some class')
|
31
|
+
|
32
|
+
assert_equal '<a href="http://example">HTTP example</a>',
|
33
|
+
@to.gen_url('http://example', 'HTTP example')
|
34
|
+
end
|
35
|
+
|
28
36
|
def test_handle_special_CROSSREF
|
29
37
|
assert_equal "<a href=\"C2/C3.html\">C2::C3</a>", SPECIAL('C2::C3')
|
30
38
|
end
|
metadata
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rdoc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 33
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 3
|
8
8
|
- 9
|
9
|
-
|
9
|
+
- 1
|
10
|
+
version: 3.9.1
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
13
|
- Eric Hodel
|
@@ -38,7 +39,7 @@ cert_chain:
|
|
38
39
|
x52qPcexcYZR7w==
|
39
40
|
-----END CERTIFICATE-----
|
40
41
|
|
41
|
-
date: 2011-07-
|
42
|
+
date: 2011-07-31 00:00:00 Z
|
42
43
|
dependencies:
|
43
44
|
- !ruby/object:Gem::Dependency
|
44
45
|
name: minitest
|
metadata.gz.sig
CHANGED
Binary file
|