Skip to content

Nested partial block loses passed hash context. #515

Description

@oformaniuk

Describe the bug

Nested partial block loses passed hash context.

Expected behavior:

Nested partial block has access to passed hash context.

Test to reproduce

[Fact]publicvoidValidContextInNestedPartialBlock(){conststringtemplate=@"{{#> [a/b] c=this }}{{c.value}}{{/ [a/b] }}";conststringpartial="{{c.value}} {{> @partial-block }}";varhandlebars=Handlebars.Create();handlebars.RegisterTemplate("a/b",@partial);varcallback=handlebars.Compile(template);varresult=callback(new{value=42});conststringexpected=@"42 42";Assert.Equal(expected,result);}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions