Fix failure when using decorators in partials
This commit is contained in:
@@ -703,6 +703,7 @@ JavaScriptCompiler.prototype = {
|
||||
}
|
||||
options.helpers = 'helpers';
|
||||
options.partials = 'partials';
|
||||
options.decorators = 'container.decorators';
|
||||
|
||||
if (!isDynamic) {
|
||||
params.unshift(this.nameLookup('partials', name, 'partial'));
|
||||
|
||||
@@ -203,4 +203,13 @@ describe('Regressions', function() {
|
||||
array[3] = 'bar';
|
||||
shouldCompileTo('{{#each array}}{{@index}}{{.}}{{/each}}', {array: array}, '1foo3bar');
|
||||
});
|
||||
|
||||
it('should support multiple levels of inline partials', function() {
|
||||
var string = '{{#> layout}}{{#*inline "subcontent"}}subcontent{{/inline}}{{/layout}}';
|
||||
var partials = {
|
||||
doctype: 'doctype{{> content}}',
|
||||
layout: '{{#> doctype}}{{#*inline "content"}}layout{{> subcontent}}{{/inline}}{{/doctype}}'
|
||||
};
|
||||
shouldCompileToWithPartials(string, [{}, {}, partials], true, 'doctypelayoutsubcontent');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user