class Kramdown::Converter::Html
def footnote_content
def footnote_content ol = Element.new(:ol) ol.options[:attr] = {'start' => @footnote_start} if @footnote_start != 1 @footnotes.each do |name, data| li = Element.new(:li, nil, {:attr => {:id => "fn:#{name}"}, :first_is_block => true}) li.children = Marshal.load(Marshal.dump(data[:content].children)) #TODO: probably remove this!!!! ol.children << li ref = Element.new(:raw, "<a href=\"#fnref:#{name}\" rev=\"footnote\">↩</a>") if li.children.last.type == :p para = li.children.last else li.children << (para = Element.new(:p)) end para.children << ref end (ol.children.empty? ? '' : "<div class=\"footnotes\">\n#{convert(ol, 2)}</div>\n") end