From 0fbde94b27d9ed08c96944717bf7bfa76897276e Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Fri, 10 Sep 2021 23:25:02 +0900 Subject: [PATCH] [ruby/rdoc] Convert upper case copyright and registered marks https://github.com/ruby/rdoc/commit/3bca7dc093 --- lib/rdoc/text.rb | 4 ++-- test/rdoc/test_rdoc_text.rb | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/rdoc/text.rb b/lib/rdoc/text.rb index 407421f453..0bc4aba428 100644 --- a/lib/rdoc/text.rb +++ b/lib/rdoc/text.rb @@ -218,10 +218,10 @@ module RDoc::Text when s.scan(/\.\.\.(\.?)/) then html << s[1] << encoded[:ellipsis] after_word = nil - when s.scan(/\(c\)/) then + when s.scan(/\(c\)/i) then html << encoded[:copyright] after_word = nil - when s.scan(/\(r\)/) then + when s.scan(/\(r\)/i) then html << encoded[:trademark] after_word = nil when s.scan(/---/) then diff --git a/test/rdoc/test_rdoc_text.rb b/test/rdoc/test_rdoc_text.rb index 590d41c3d9..a6b1597bbf 100644 --- a/test/rdoc/test_rdoc_text.rb +++ b/test/rdoc/test_rdoc_text.rb @@ -502,6 +502,7 @@ The comments associated with def test_to_html_copyright assert_equal '©', to_html('(c)') + assert_equal '©', to_html('(C)') end def test_to_html_dash @@ -557,6 +558,7 @@ The comments associated with def test_to_html_registered_trademark assert_equal '®', to_html('(r)') + assert_equal '®', to_html('(R)') end def test_to_html_tt_tag