File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -182,13 +182,13 @@ def convert_flow(flow)
182182 case item
183183 when RDoc ::Markup ::AttrChanger then
184184 # Make "+Class#method+" a cross reference
185- if respond_to? ( :cross_reference ) and
186- tt_tag? ( item . turn_on ) and
187- String === ( str = flow [ i ] ) and
185+ if tt_tag? ( item . turn_on ) and
186+ String === ( text = flow [ i ] ) and
188187 RDoc ::Markup ::AttrChanger === flow [ i +1 ] and
189188 tt_tag? ( flow [ i +1 ] . turn_off , true ) and
190- ( text = cross_reference str ) != str
189+ ( @options . hyperlink_all ? ALL_CROSSREF_REGEXP : CROSSREF_REGEXP ) . match? ( text )
191190 then
191+ text = cross_reference text
192192 text = yield text , res if defined? ( yield )
193193 res << text
194194 i += 2
Original file line number Diff line number Diff line change @@ -17,8 +17,10 @@ def test_convert_CROSSREF
1717 assert_equal para ( "<a href=\" C1.html\" ><code>C1</code></a>" ) , result
1818
1919 result = @to . convert '+C1+'
20-
2120 assert_equal para ( "<a href=\" C1.html\" ><code>C1</code></a>" ) , result
21+
22+ result = @to . convert '<tt># :stopdoc:</tt>:'
23+ assert_equal para ( "<code># :stopdoc:</code>:" ) , result
2224 end
2325
2426 def test_convert_CROSSREF_method
You can’t perform that action at this time.
0 commit comments