class Kramdown::Parser::Html::ElementConverter

def process(el, do_conversion = true, preserve_text = false, parent = nil)

Convert the element +el+ and its children.
def process(el, do_conversion = true, preserve_text = false, parent = nil)
  case el.type
  when :xml_comment, :xml_pi
    ptype = if parent.nil?
              'div'
            else
              case parent.type
              when :html_element then parent.value
              when :code_span then 'code'
              when :code_block then 'pre'
              when :header then 'h1'
              else parent.type.to_s
              end
            end
    el.options.replace({:category => (HTML_CONTENT_MODEL[ptype] == :span ? :span : :block)})
    return
  when :html_element
  when :root
    el.children.each {|c| process(c)}
    remove_whitespace_children(el)
    return
  else return
  end
  type = el.value
  remove_text_children(el) if REMOVE_TEXT_CHILDREN.include?(type)
  mname = "convert_#{el.value}"
  if do_conversion && self.class.method_defined?(mname)
    send(mname, el)
  elsif do_conversion && SIMPLE_ELEMENTS.include?(type)
    set_basics(el, type.intern)
    process_children(el, do_conversion, preserve_text)
  else
    process_html_element(el, do_conversion, preserve_text)
  end
  strip_whitespace(el) if STRIP_WHITESPACE.include?(type)
  remove_whitespace_children(el) if REMOVE_WHITESPACE_CHILDREN.include?(type)
  wrap_text_children(el) if WRAP_TEXT_CHILDREN.include?(type)
end