diff --git a/libs/FuManchu/Parser/HandlebarsParser.cs b/libs/FuManchu/Parser/HandlebarsParser.cs index d571e46..1b78eb3 100644 --- a/libs/FuManchu/Parser/HandlebarsParser.cs +++ b/libs/FuManchu/Parser/HandlebarsParser.cs @@ -770,7 +770,7 @@ public void AtTag() } PutBack(current!); NextToken(); - if (Context!.CurrentBlock.IsPartialBlock) + if (Context!.CurrentBlock.IsPartialBlock && !Context.CurrentBlock.IsPartialBlockContent) { // This is a zone content element, which is actually a block, not a span AtPartialBlockContentTag(); diff --git a/tests/FuManchu.Tests/Renderer/PartialBlockRendererFacts.cs b/tests/FuManchu.Tests/Renderer/PartialBlockRendererFacts.cs index c26dc49..70b14fa 100644 --- a/tests/FuManchu.Tests/Renderer/PartialBlockRendererFacts.cs +++ b/tests/FuManchu.Tests/Renderer/PartialBlockRendererFacts.cs @@ -116,4 +116,16 @@ public void CanRenderPartialBlock_WithManyZones() RenderTest(template, expected); } + + [Fact] + public void CanRenderPartialBlock_WithNestedPartial() + { + HandlebarsService.RegisterPartial("paragraph", "

{{text}}

"); + HandlebarsService.RegisterPartial("layout", "{{