Parent

Class/Module Index [+]

Quicksearch

Webgen::ContentProcessor::KramdownHtmlConverter

Public Class Methods

convert(doc, context) click to toggle source

Convert the Kramdown document doc to HTML using the webgen context object.

# File lib/webgen/contentprocessor/kramdown/html.rb, line 19
def self.convert(doc, context)
  new(doc, context).convert(doc.tree)
end

Public Instance Methods

convert_a(el, indent, opts) click to toggle source
# File lib/webgen/contentprocessor/kramdown/html.rb, line 23
def convert_a(el, indent, opts)
  el.options[:attr]['href'] = @context.tag('relocatable', {'path' => el.options[:attr]['href']}) if @do_convert
  "<a#{html_attributes(el)}>#{inner(el, indent, opts)}</a>"
end
convert_img(el, indent, opts) click to toggle source
# File lib/webgen/contentprocessor/kramdown/html.rb, line 28
def convert_img(el, indent, opts)
  el.options[:attr]['src'] = @context.tag('relocatable', {'path' => el.options[:attr]['src']}) if @do_convert
  "<img#{html_attributes(el)} />"
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.