                 if tag.pending.length
                     tag.pending[0].once 'end', on_end
                 else
-                    if tag.buffer.length
-                        @buffer = @buffer.concat tag.buffer
-                        tag.buffer = []
                     @pending = @pending.slice(1)
-                    flush.call this
                     if @closed and @pending.length is 0
                         @end()
             else
                 for known, i in @pending
                     if tag is known
                         @pending = @pending.slice(0,i).concat @pending.slice i+1
-                        if @buffer.length
-                            before = @pending[i-1]
-                            before.buffer = before.buffer.concat @buffer
-                            @buffer = []
                         if @closed is 'pending'
-                            flush.call this
                             @end()
                         return
                 throw new Error("this shouldn't happen D:")

        tag.builder ?= @builder
        tag.parent  ?= this

        tag.on? 'data', (data) =>
            if @pending[0] is tag
                @write data
            else
                @buffer.push data

        pipe = (event) =>
            tag.on? event, =>
                @emit event, arguments...

    constructor: (@opts = {}) ->
        # values
        @builder = this
        @pending = [] # no open child tag
        @checkers = {} # all the middlewares that have to approve a new tag
        # states
