class Asciidoctor::DocBook45::InlineQuotedTemplate

Constants

QUOTED_TAGS

Public Instance Methods

quote(text, type, role) click to toggle source
# File lib/asciidoctor/backends/docbook45.rb, line 508
def quote(text, type, role)
  start_tag, end_tag = QUOTED_TAGS[type] || ['', '']
  if role
    "#{start_tag}<phrase role=\"#{role}\">#{text}</phrase>#{end_tag}"
  else
    "#{start_tag}#{text}#{end_tag}"
  end
end
template() click to toggle source
# File lib/asciidoctor/backends/docbook45.rb, line 517
  def template
    # very hot piece of code, optimized for speed
    @template ||= @eruby.new "<%#encoding:UTF-8%><%= template.quote(@text, @type, attr('role')) %>
"
  end