# File lib/asciidoctor/substitutors.rb, line 379 def sub_quotes text if QuotedTextSniffRx[compat = @document.compat_mode].match? text # NOTE interpolation is faster than String#dup text = %(#{text}) QUOTE_SUBS[compat].each do |type, scope, pattern| # NOTE using gsub! here as an MRI Ruby optimization text.gsub!(pattern) { convert_quoted_text $~, type, scope } end end text end