Remove inline option from pushStack
This commit is contained in:
@@ -760,7 +760,8 @@ Handlebars.JavaScriptCompiler = function() {};
|
|||||||
//
|
//
|
||||||
// Push an expression onto the stack
|
// Push an expression onto the stack
|
||||||
push: function(expr) {
|
push: function(expr) {
|
||||||
return this.pushStack(expr, true);
|
this.inlineStack.push(expr);
|
||||||
|
return expr;
|
||||||
},
|
},
|
||||||
|
|
||||||
// [pushLiteral]
|
// [pushLiteral]
|
||||||
@@ -955,20 +956,15 @@ Handlebars.JavaScriptCompiler = function() {};
|
|||||||
return this.push(new Literal(item));
|
return this.push(new Literal(item));
|
||||||
},
|
},
|
||||||
|
|
||||||
pushStack: function(item, inline) {
|
pushStack: function(item) {
|
||||||
if (inline) {
|
this.flushInline();
|
||||||
this.inlineStack.push(item);
|
|
||||||
return item;
|
|
||||||
} else {
|
|
||||||
this.flushInline();
|
|
||||||
|
|
||||||
var stack = this.incrStack();
|
var stack = this.incrStack();
|
||||||
if (item) {
|
if (item) {
|
||||||
this.source.push(stack + " = " + item + ";");
|
this.source.push(stack + " = " + item + ";");
|
||||||
}
|
|
||||||
this.compileStack.push(stack);
|
|
||||||
return stack;
|
|
||||||
}
|
}
|
||||||
|
this.compileStack.push(stack);
|
||||||
|
return stack;
|
||||||
},
|
},
|
||||||
|
|
||||||
replaceStack: function(callback) {
|
replaceStack: function(callback) {
|
||||||
|
|||||||
Reference in New Issue
Block a user