Closed oformaniuk closed 2 years ago
Nested partial block loses passed hash context.
Nested partial block has access to passed hash context.
[Fact] public void ValidContextInNestedPartialBlock() { const string template = @"{{#> [a/b] c=this }}{{c.value}}{{/ [a/b] }}"; const string partial = "{{c.value}} {{> @partial-block }}"; var handlebars = Handlebars.Create(); handlebars.RegisterTemplate("a/b", @partial); var callback = handlebars.Compile(template); var result = callback(new { value = 42 }); const string expected = @"42 42"; Assert.Equal(expected, result); }
Describe the bug
Nested partial block loses passed hash context.
Expected behavior:
Nested partial block has access to passed hash context.
Test to reproduce