Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert upper case copyright and registered marks #837

Merged
merged 1 commit into from
Sep 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/rdoc/text.rb
Original file line number Diff line number Diff line change
Expand Up @@ -218,10 +218,10 @@ def to_html 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
Expand Down
2 changes: 2 additions & 0 deletions test/rdoc/test_rdoc_text.rb
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,7 @@ def test_to_html_br

def test_to_html_copyright
assert_equal '©', to_html('(c)')
assert_equal '©', to_html('(C)')
end

def test_to_html_dash
Expand Down Expand Up @@ -549,6 +550,7 @@ def test_to_html_html_tag

def test_to_html_registered_trademark
assert_equal '®', to_html('(r)')
assert_equal '®', to_html('(R)')
end

def test_to_html_tt_tag
Expand Down