class Hpricot::Elem
def output(out, opts = {})
def output(out, opts = {}) if empty? and ElementContent[@stag.name] == :EMPTY @stag.output(out, opts.merge(:style => :empty)) else @stag.output(out, opts) @children.each { |n| n.output(out, opts) } if @etag @etag.output(out, opts) elsif !opts[:preserve] ETag.new(@stag.name).output(out, opts) end end out end