Skip to content

Commit 9d07ecf

Browse files
authored
Merge pull request #837 from nobu/upper-copyright
Convert upper case copyright and registered marks
2 parents cfce04e + 3bca7dc commit 9d07ecf

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
@@ -502,6 +502,7 @@ def test_to_html_br
502502

503503
def test_to_html_copyright
504504
assert_equal '©', to_html('(c)')
505+
assert_equal '©', to_html('(C)')
505506
end
506507

507508
def test_to_html_dash
@@ -557,6 +558,7 @@ def test_to_html_html_tag
557558

558559
def test_to_html_registered_trademark
559560
assert_equal '®', to_html('(r)')
561+
assert_equal '®', to_html('(R)')
560562
end
561563

562564
def test_to_html_tt_tag

0 commit comments

Comments
 (0)