Merge pull request #96 from gleitz/master

Allow boolean calls to work with YUI Compressor
This commit is contained in:
Yehuda Katz
2011-06-22 16:37:26 -07:00
4 changed files with 9 additions and 9 deletions
+2 -2
View File
@@ -88,9 +88,9 @@ var Handlebars = require("handlebars");
this.integer = integer;
};
Handlebars.AST.BooleanNode = function(boolean) {
Handlebars.AST.BooleanNode = function(bool) {
this.type = "BOOLEAN";
this.boolean = boolean;
this.bool = bool;
};
Handlebars.AST.CommentNode = function(comment) {
+2 -2
View File
@@ -228,8 +228,8 @@ Handlebars.JavaScriptCompiler = function() {};
this.opcode('push', integer.integer);
},
BOOLEAN: function(boolean) {
this.opcode('push', boolean.boolean);
BOOLEAN: function(bool) {
this.opcode('push', bool.bool);
},
comment: function() {},
+4 -4
View File
@@ -111,11 +111,11 @@ Handlebars.PrintVisitor.prototype.STRING = function(string) {
Handlebars.PrintVisitor.prototype.INTEGER = function(integer) {
return "INTEGER{" + integer.integer + "}";
}
};
Handlebars.PrintVisitor.prototype.BOOLEAN = function(boolean) {
return "BOOLEAN{" + boolean.boolean + "}";
}
Handlebars.PrintVisitor.prototype.BOOLEAN = function(bool) {
return "BOOLEAN{" + bool.bool + "}";
};
Handlebars.PrintVisitor.prototype.ID = function(id) {
var path = id.parts.join("/");
+1 -1
View File
@@ -26,7 +26,7 @@ Handlebars.SafeString.prototype.toString = function() {
var possible = /[&<>"'`]/;
var escapeChar = function(chr) {
return escape[chr] || "&amp;"
return escape[chr] || "&amp;";
};
Handlebars.Utils = {