diff --git a/lib/handlebars/compiler/ast.js b/lib/handlebars/compiler/ast.js index 002fd3be6..dda682e7e 100644 --- a/lib/handlebars/compiler/ast.js +++ b/lib/handlebars/compiler/ast.js @@ -189,6 +189,7 @@ var AST = { LocationInfo.call(this, locInfo); this.type = "DATA"; this.id = id; + this.stringModeValue = id.stringModeValue; }, StringNode: function(string, locInfo) { diff --git a/spec/string-params.js b/spec/string-params.js index 920b85592..1cebc6f08 100644 --- a/spec/string-params.js +++ b/spec/string-params.js @@ -158,4 +158,19 @@ describe('string params mode', function() { var result = template({}, {helpers: helpers}); equals(result, "WITH"); }); + + it('should handle DATA', function() { + var template = CompilerContext.compile('{{foo @bar}}', { stringParams: true }); + + var helpers = { + foo: function(bar, options) { + equal(bar, 'bar'); + equal(options.types[0], 'DATA'); + return 'Foo!'; + } + }; + + var result = template({}, { helpers: helpers }); + equal(result, 'Foo!'); + }); });