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(
2431
2431
}
2432
2432
2433
2433
// ==============================================================
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
2435
2442
// ==============================================================
2436
2443
if (closeTag.removeRWhitespace ) {
2437
2444
templateText = trim_lspaces (templateText);
Original file line number Diff line number Diff line change @@ -1689,6 +1689,15 @@ partial_blocks()
1689
1689
" {{#>nested}}1{{#>nested}}2{{/nested}}3{{/nested}}" ) ==
1690
1690
" 123" );
1691
1691
}
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
+ }
1692
1701
}
1693
1702
1694
1703
void
You can’t perform that action at this time.
0 commit comments