                     else
                         data = "</#{@name}>"
                         @closed = yes
-                    @emit 'data', prettify this, data
+                    @emit 'data', prettify this, data unless @hidden
                     @emit 'close', this
                     @emit 'end'
                     @writable = false


    write: (content, {escape} = {}) =>
        content = safe(content) if escape
        if @isempty
            @emit 'data', prettify this, "<#{@name}#{new_attrs @attrs}>"
            @isempty = no

        opts.end ?= true
        @end arguments... if opts.end
        @parent

    show: () =>
        @hidden = no
        @emit 'show', this
        this

    hide: () =>
        @hidden = yes
        @emit 'hide', this
        this

    end: () =>
        if not @closed or @closed is 'pending' or @closed is 'approving'
