'Return the buffer contents of the frame.'

def return_buffer_contents(self, frame, force_unescaped=False):

    if (not force_unescaped):
        if frame.eval_ctx.volatile:
            self.writeline('if    context.eval_ctx.autoescape:')
            self.indent()
            self.writeline(('return    Markup(concat(%s))' % frame.buffer))
            self.outdent()
            self.writeline('else:')
            self.indent()
            self.writeline(('return    concat(%s)' % frame.buffer))
            self.outdent()
            return
        elif frame.eval_ctx.autoescape:
            self.writeline(('return    Markup(concat(%s))' % frame.buffer))
            return
    self.writeline(('return    concat(%s)' % frame.buffer))
