class Kramdown::Converter::Html

def footnote_content

Return a HTML ordered list with the footnote content for the used footnotes.
def footnote_content
  ol = Element.new(:ol)
  ol.attr['start'] = @footnote_start if @footnote_start != 1
  i = 0
  backlink_text = escape_html(@options[:footnote_backlink], :text)
  while i < @footnotes.length
    name, data, _, repeat = *@footnotes[i]
    li = Element.new(:li, nil, {'id' => "fn:#{name}"})
    li.children = Marshal.load(Marshal.dump(data.children))
    if li.children.last.type == :p
      para = li.children.last
      insert_space = true
    else
      li.children << (para = Element.new(:p))
      insert_space = false
    end
    unless @options[:footnote_backlink].empty?
      para.children << Element.new(:raw, FOOTNOTE_BACKLINK_FMT % [insert_space ? ' ' : '', name, backlink_text])
      (1..repeat).each do |index|
        para.children << Element.new(:raw, FOOTNOTE_BACKLINK_FMT % [" ", "#{name}:#{index}", "#{backlink_text}<sup>#{index+1}</sup>"])
      end
    end
    ol.children << Element.new(:raw, convert(li, 4))
    i += 1
  end
  (ol.children.empty? ? '' : format_as_indented_block_html('div', {:class => "footnotes"}, convert(ol, 2), 0))
end