function(template, context, partials, in_recursion) {
        // tit for tat
        var that = this;

        var tag_replace_callback = function(match, operator, name) {
            switch(operator) {
                case "!": // ignore comments
                    return "";
                case ">": // render partial
                    return that.render_partial(name, context, partials);
                case "{": // the triple mustache is unescaped
                    return that.find(name, context);
                default: // escape the value
                    return dom.escapeHTML(that.find(name, context));
            }
        };
        var lines = template.split("\n");
        for(var i = 0; i < lines.length; i++) {
            lines[i] = lines[i].replace(tagRegex, tag_replace_callback, this);
            if(!in_recursion) {
                this.send(lines[i]);
            }
        }

        if(in_recursion) {
            return lines.join("\n");
        }
    }
function(template, context, partials, in_recursion) {
        
        var that = this;

        var tag_replace_callback = function(match, operator, name) {
            switch(operator) {
                case "!": 
                    return "";
                case ">": 
                    return that.render_partial(name, context, partials);
                case "{": 
                    return that.find(name, context);
                default: 
                    return dom.escapeHTML(that.find(name, context));
            }
        };
        var lines = template.split("\n");
        for(var i = 0; i < lines.length; i++) {
            lines[i] = lines[i].replace(tagRegex, tag_replace_callback, this);
            if(!in_recursion) {
                this.send(lines[i]);
            }
        }

        if(in_recursion) {
            return lines.join("\n");
        }
    }
function ( template , context , partials , in_recursion ) { // tit for tat var that = this ; var tag_replace_callback = function ( match , operator , name ) { switch ( operator ) { case "!" : // ignore comments return "" ; case ">" : // render partial return that . render_partial ( name , context , partials ) ; case "{" : // the triple mustache is unescaped return that . find ( name , context ) ; default : // escape the value return dom . escapeHTML ( that . find ( name , context ) ) ; } } ; var lines = template . split ( "\n" ) ; for ( var i = 0 ; i < lines . length ; i ++ ) { lines [ i ] = lines [ i ] . replace ( tagRegex , tag_replace_callback , this ) ; if ( ! in_recursion ) { this . send ( lines [ i ] ) ; } } if ( in_recursion ) { return lines . join ( "\n" ) ; } }
/*
Replace {{foo}} and friends with values from our view
/ * Replace {{ foo }} and friends with values from our view