Skip to content

Commit

Permalink
Convert tick double quote in character entity references
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu committed Sep 10, 2021
1 parent 82eaefb commit 6ed889a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rdoc/text.rb
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ def to_html text
when s.scan(/``/) then # backtick double quote
html << encoded[:open_dquote]
after_word = nil
when s.scan(/''/) then # tick double quote
when s.scan(/(?:&#39;|'){2}/) then # tick double quote
html << encoded[:close_dquote]
after_word = nil
when s.scan(/`/) then # backtick
Expand Down
1 change: 1 addition & 0 deletions test/rdoc/test_rdoc_text.rb
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,7 @@ def test_to_html_dash
def test_to_html_double_backtick
assert_equal '“a', to_html('``a')
assert_equal '“a“', to_html('``a``')
assert_equal '“a”', to_html("``a''")
end

def test_to_html_double_quote
Expand Down

0 comments on commit 6ed889a

Please sign in to comment.