Skip to content

Commit 3bca7dc

Browse files
committed
Convert upper case copyright and registered marks
1 parent 2f7dfec commit 3bca7dc

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

lib/rdoc/text.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,10 +218,10 @@ def to_html text
218218
when s.scan(/\.\.\.(\.?)/) then
219219
html << s[1] << encoded[:ellipsis]
220220
after_word = nil
221-
when s.scan(/\(c\)/) then
221+
when s.scan(/\(c\)/i) then
222222
html << encoded[:copyright]
223223
after_word = nil
224-
when s.scan(/\(r\)/) then
224+
when s.scan(/\(r\)/i) then
225225
html << encoded[:trademark]
226226
after_word = nil
227227
when s.scan(/---/) then

test/rdoc/test_rdoc_text.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -495,6 +495,7 @@ def test_to_html_br
495495

496496
def test_to_html_copyright
497497
assert_equal '©', to_html('(c)')
498+
assert_equal '©', to_html('(C)')
498499
end
499500

500501
def test_to_html_dash
@@ -549,6 +550,7 @@ def test_to_html_html_tag
549550

550551
def test_to_html_registered_trademark
551552
assert_equal '®', to_html('(r)')
553+
assert_equal '®', to_html('(R)')
552554
end
553555

554556
def test_to_html_tt_tag

0 commit comments

Comments
 (0)