From bc0ea95ca8742b11d361952232d22c4ac0e33e83 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Fri, 10 Sep 2021 22:56:13 +0900 Subject: [ruby/rdoc] Convert tick double quote in character entity references https://github.com/ruby/rdoc/commit/6ed889aac9 --- lib/rdoc/text.rb | 2 +- test/rdoc/test_rdoc_text.rb | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/rdoc/text.rb b/lib/rdoc/text.rb index 77318e46e4..407421f453 100644 --- a/lib/rdoc/text.rb +++ b/lib/rdoc/text.rb @@ -237,7 +237,7 @@ module RDoc::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(/(?:'|'){2}/) then # tick double quote html << encoded[:close_dquote] after_word = nil when s.scan(/`/) then # backtick diff --git a/test/rdoc/test_rdoc_text.rb b/test/rdoc/test_rdoc_text.rb index 02c56a2829..590d41c3d9 100644 --- a/test/rdoc/test_rdoc_text.rb +++ b/test/rdoc/test_rdoc_text.rb @@ -514,6 +514,7 @@ The comments associated with 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 -- cgit v1.2.3