class Kramdown::Converter::Kramdown

def convert(el, opts = {indent: 0})

def convert(el, opts = {indent: 0})
  res = send("convert_#{el.type}", el, opts)
  res = res.dup if res.frozen?
  if ![:html_element, :li, :dt, :dd, :td].include?(el.type) && (ial = ial_for_element(el))
    res << ial
    res << "\n\n" if Element.category(el) == :block
  elsif [:ul, :dl, :ol, :codeblock].include?(el.type) && opts[:next] &&
      ([el.type, :codeblock].include?(opts[:next].type) ||
       (opts[:next].type == :blank && opts[:nnext] &&
        [el.type, :codeblock].include?(opts[:nnext].type)))
    res << "^\n\n"
  elsif Element.category(el) == :block &&
      ![:li, :dd, :dt, :td, :th, :tr, :thead, :tbody, :tfoot, :blank].include?(el.type) &&
      (el.type != :html_element || @stack.last.type != :html_element) &&
      (el.type != :p || !el.options[:transparent])
    res << "\n"
  end
  res
end