From 6944163415997e75e0d70ea860dad6071ee5d79a Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sat, 28 Aug 2021 12:57:36 +0900 Subject: [ruby/rdoc] Convert a backtick to an open single quote https://github.com/ruby/rdoc/commit/82eaefbae4 --- lib/rdoc/text.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib/rdoc') diff --git a/lib/rdoc/text.rb b/lib/rdoc/text.rb index 2fc47daa66..77318e46e4 100644 --- a/lib/rdoc/text.rb +++ b/lib/rdoc/text.rb @@ -240,6 +240,14 @@ module RDoc::Text when s.scan(/''/) then # tick double quote html << encoded[:close_dquote] after_word = nil + when s.scan(/`/) then # backtick + if insquotes or after_word + html << '`' + after_word = false + else + html << encoded[:open_squote] + insquotes = true + end when s.scan(/'|'/) then # single quote if insquotes html << encoded[:close_squote] -- cgit v1.2.3