File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -2431,7 +2431,14 @@ parseBlock(
24312431 }
24322432
24332433 // ==============================================================
2434- // Apply close tag whitespace control
2434+ // Apply open tag whitespace control to block
2435+ // ==============================================================
2436+ if (tag.removeRWhitespace ) {
2437+ fnBlock = trim_lspaces (fnBlock);
2438+ }
2439+
2440+ // ==============================================================
2441+ // Apply close tag whitespace control after block
24352442 // ==============================================================
24362443 if (closeTag.removeRWhitespace ) {
24372444 templateText = trim_lspaces (templateText);
Original file line number Diff line number Diff line change @@ -1689,6 +1689,15 @@ partial_blocks()
16891689 " {{#>nested}}1{{#>nested}}2{{/nested}}3{{/nested}}" ) ==
16901690 " 123" );
16911691 }
1692+
1693+ // should remove whitespace from nested partial blocks
1694+ {
1695+ hbs.registerPartial (" nested" , " {{> @partial-block }}" );
1696+ BOOST_TEST (
1697+ hbs.render (
1698+ " {{#>nested~}} 1 {{~#>nested~}} 2 {{~/nested ~}} 3 {{~/nested}}" ) ==
1699+ " 123" );
1700+ }
16921701}
16931702
16941703void
You can’t perform that action at this time.
0 commit comments