Top Level Namespace

Defined Under Namespace

Modules: Asciidoctor

Constant Summary collapse

CHART_HTML_TEMPLATE =
Tilt.new('chart.html.erb', format: :html5, pretty: true, disable_escape: true) do |_t|
  <<-ERB
    <%= Class.new.extend(Asciidoctor::Chart::Html5ChartConverterExt).convert_chart self %>
  ERB
end

Instance Method Summary collapse

Instance Method Details

#register_chart_converter(converter) ⇒ Object



30
31
32
33
34
35
36
37
# File 'lib/asciidoctor/chart.rb', line 30

def register_chart_converter converter
  if (converter.instance_of? Asciidoctor::Converter::TemplateConverter) || (converter.respond_to? 'register')
    # Template based converter
    converter.register 'chart', CHART_HTML_TEMPLATE
  else
    converter.extend(Asciidoctor::Chart::Html5ChartConverterExt)
  end
end