Merge commit '87b5d4ee61605b026506e92c9e8873d867c5f150' into es6-modules
Conflicts: dist/handlebars.js dist/handlebars.runtime.js lib/handlebars/base.js lib/handlebars/utils.js
This commit is contained in:
@@ -20,6 +20,8 @@ describe('builtin helpers', function() {
|
||||
"if with non-empty array shows the contents");
|
||||
shouldCompileTo(string, {goodbye: [], world: "world"}, "cruel world!",
|
||||
"if with empty array does not show the contents");
|
||||
shouldCompileTo(string, {goodbye: 0, world: "world"}, "GOODBYE cruel world!",
|
||||
"if with zero does show the contents");
|
||||
});
|
||||
|
||||
it("if with function argument", function() {
|
||||
|
||||
+2
-2
@@ -108,11 +108,11 @@ describe('parser', function() {
|
||||
});
|
||||
|
||||
it('parses empty blocks with empty inverse section', function() {
|
||||
ast_for("{{#foo}}{{^}}{{/foo}}").should.equal("BLOCK:\n {{ ID:foo [] }}\n PROGRAM:\n {{^}}\n");
|
||||
ast_for("{{#foo}}{{^}}{{/foo}}").should.equal("BLOCK:\n {{ ID:foo [] }}\n PROGRAM:\n");
|
||||
});
|
||||
|
||||
it('parses empty blocks with empty inverse (else-style) section', function() {
|
||||
ast_for("{{#foo}}{{else}}{{/foo}}").should.equal("BLOCK:\n {{ ID:foo [] }}\n PROGRAM:\n {{^}}\n");
|
||||
ast_for("{{#foo}}{{else}}{{/foo}}").should.equal("BLOCK:\n {{ ID:foo [] }}\n PROGRAM:\n");
|
||||
});
|
||||
|
||||
it('parses non-empty blocks with empty inverse section', function() {
|
||||
|
||||
Reference in New Issue
Block a user