File tree Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 3
3
* Bug fixes
4
4
* Fix RDoc::Markup parser for a header followed by a non-text token. Issue
5
5
#56 by Adam Tait
6
+ * Fix RDoc::Markup::ToHtmlCrossref#gen_url for non-<tt>rdoc-ref</tt> links.
6
7
* Fix bug report URL when rdoc crashes.
7
8
8
9
=== 3.9 / 2011-07-30
Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ def handle_special_HYPERLINK special
97
97
# RDoc::Markup::ToHtml to handle other schemes.
98
98
99
99
def gen_url url , text
100
- super unless url =~ /\A rdoc-ref:/
100
+ return super unless url =~ /\A rdoc-ref:/
101
101
102
102
cross_reference $', text
103
103
end
Original file line number Diff line number Diff line change @@ -25,6 +25,14 @@ def test_convert_HYPERLINK_rdoc_ref
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
You can’t perform that action at this time.
0 commit comments