# File lib/asciidoctor/helpers.rb, line 159
  def self.encode_uri(str)
    str.gsub(REGEXP_ENCODE_URI_CHARS) do
      $&.each_byte.map {|c| sprintf '%%%02X', c}.join
    end
  end