File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2044,6 +2044,25 @@ public void HtmlEncoderCompatibilityIntegration_LateChangeConfig(bool useLegacyH
20442044
20452045 Assert . Equal ( expected , actual ) ;
20462046 }
2047+
2048+ [ Fact ]
2049+ public void ChainedPathIteratorHelper ( )
2050+ {
2051+ var context = new
2052+ {
2053+ bundles = new
2054+ {
2055+ styles = new
2056+ {
2057+ vendor = new [ ] { "a" , "b" , "c" }
2058+ }
2059+ }
2060+ } ;
2061+
2062+ var nestedObjectsHelperResult = Handlebars . Compile ( "{{#bundles.styles.vendor}}{{this}}{{/bundles.styles.vendor}}" ) ( context ) ;
2063+
2064+ Assert . Equal ( "abc" , nestedObjectsHelperResult ) ;
2065+ }
20472066
20482067 private class StringHelperResolver : IHelperResolver
20492068 {
Original file line number Diff line number Diff line change @@ -189,7 +189,8 @@ public static PathInfo Parse(string path)
189189 }
190190
191191 var chainSegments = GetPathChain ( segment ) ;
192- if ( chainSegments . Length > 1 ) isValidHelperLiteral = false ;
192+
193+ if ( chainSegments . Length > 1 && pathType != PathType . BlockHelper ) isValidHelperLiteral = false ;
193194
194195 segments . Add ( new PathSegment ( segment , chainSegments ) ) ;
195196 }
You can’t perform that action at this time.
0 commit comments