Skip to content

Commit 772d5e2

Browse files
committed
Address feedback
1 parent fc27830 commit 772d5e2

2 files changed

Lines changed: 6 additions & 15 deletions

File tree

lib/rdoc/markup/to_html_crossref.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -228,12 +228,12 @@ def convert_flow(flow_items, &block)
228228
# When the candidate occupies the whole span (aside from trailing
229229
# punctuation), the tt markup is replaced by the resolved cross-reference.
230230

231-
def convert_tt_crossref(flow, index)
232-
opener = flow[index]
231+
def convert_tt_crossref(flow_items, index)
232+
opener = flow_items[index]
233233
return unless tt_tag?(opener.turn_on)
234234

235-
string = flow[index + 1]
236-
closer = flow[index + 2]
235+
string = flow_items[index + 1]
236+
closer = flow_items[index + 2]
237237

238238
return unless String === string
239239
return unless RDoc::Markup::AttrChanger === closer

test/rdoc/rdoc_markup_to_html_crossref_test.rb

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,30 +34,21 @@ def test_convert_CROSSREF
3434
end
3535

3636
def test_convert_CROSSREF_backslash_in_tt
37-
hyperlink_all = @options.hyperlink_all
3837
@options.hyperlink_all = false
3938

40-
formatter = RDoc::Markup::ToHtmlCrossref.new @options, 'C9.html', @c9_b
41-
result = formatter.convert '<tt>C1</tt>'
39+
formatter = RDoc::Markup::ToHtmlCrossref.new(@options, 'C9.html', @c9_b)
4240

41+
result = formatter.convert '<tt>C1</tt>'
4342
assert_equal para('<a href="C1.html"><code>C1</code></a>'), result
4443

45-
formatter = RDoc::Markup::ToHtmlCrossref.new @options, 'C9.html', @c9_b
4644
result = formatter.convert '<tt>.bar.hello()</tt>'
47-
4845
assert_equal para('<code>.bar.hello()</code>'), result
4946

50-
formatter = RDoc::Markup::ToHtmlCrossref.new @options, 'C9.html', @c9_b
5147
result = formatter.convert '<tt>.bar.hello(\)</tt>'
52-
5348
assert_equal para('<code>.bar.hello(\)</code>'), result
5449

55-
formatter = RDoc::Markup::ToHtmlCrossref.new @options, 'C9.html', @c9_b
5650
result = formatter.convert '<tt>.bar.hello(\\\\)</tt>'
57-
5851
assert_equal para('<code>.bar.hello(\\)</code>'), result
59-
ensure
60-
@options.hyperlink_all = hyperlink_all
6152
end
6253

6354
def test_convert_CROSSREF_ignored_excluded_words

0 commit comments

Comments
 (0)