linting
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
var Handlebars = {};
|
||||
Handlebars.Visitor = require("handlebars/jison_ext").Visitor
|
||||
Handlebars.Visitor = require("handlebars/jison_ext").Visitor;
|
||||
|
||||
// BEGIN(BROWSER)
|
||||
Handlebars.PrintVisitor = function() { this.padding = 0; };
|
||||
Handlebars.PrintVisitor.prototype = new Handlebars.Visitor;
|
||||
Handlebars.PrintVisitor.prototype = new Handlebars.Visitor();
|
||||
|
||||
Handlebars.PrintVisitor.prototype.pad = function(string, newline) {
|
||||
var out = "";
|
||||
@@ -14,18 +14,19 @@ Handlebars.PrintVisitor.prototype.pad = function(string, newline) {
|
||||
|
||||
out = out + string;
|
||||
|
||||
if(newline !== false) { out = out + "\n" }
|
||||
if(newline !== false) { out = out + "\n"; }
|
||||
return out;
|
||||
};
|
||||
|
||||
Handlebars.PrintVisitor.prototype.program = function(program) {
|
||||
var out = this.pad("PROGRAM:"),
|
||||
statements = program.statements,
|
||||
inverse = program.inverse;
|
||||
inverse = program.inverse,
|
||||
i, l;
|
||||
|
||||
this.padding++;
|
||||
|
||||
for(var i=0, l=statements.length; i<l; i++) {
|
||||
for(i=0, l=statements.length; i<l; i++) {
|
||||
out = out + this.accept(statements[i]);
|
||||
}
|
||||
|
||||
@@ -36,7 +37,7 @@ Handlebars.PrintVisitor.prototype.program = function(program) {
|
||||
|
||||
this.padding++;
|
||||
|
||||
for(var i=0, l=inverse.statements.length; i<l; i++) {
|
||||
for(i=0, l=inverse.statements.length; i<l; i++) {
|
||||
out = out + this.accept(inverse.statements[i]);
|
||||
}
|
||||
}
|
||||
@@ -78,7 +79,7 @@ Handlebars.PrintVisitor.prototype.mustache = function(mustache) {
|
||||
paramStrings.push(this.accept(params[i]));
|
||||
}
|
||||
|
||||
var params = "[" + paramStrings.join(", ") + "]";
|
||||
params = "[" + paramStrings.join(", ") + "]";
|
||||
return this.pad("{{ " + this.accept(mustache.id) + " " + params + " }}");
|
||||
};
|
||||
|
||||
@@ -107,7 +108,7 @@ Handlebars.PrintVisitor.prototype.content = function(content) {
|
||||
|
||||
Handlebars.PrintVisitor.prototype.comment = function(comment) {
|
||||
return this.pad("{{! '" + comment.comment + "' }}");
|
||||
}
|
||||
};
|
||||
// END(BROWSER)
|
||||
|
||||
exports.PrintVisitor = Handlebars.PrintVisitor;
|
||||
|
||||
Reference in New Issue
Block a user