Reading from the Handlebars specs, the opening Partial Block expressions appear to allow whitespace.
http://handlebarsjs.com/partials.html#partial-block
{{#> myPartial }}
Failover content
{{/myPartial}}
This currently throws an exception, (I'm using the latest bleeding-edge build, v1.9.0-ci, from commit: a56efe8 - I haven't tested any other version/release).
Reached end of template before block expression
[HandlebarsCompilerException: Reached end of template before block expression '' was closed]
HandlebarsDotNet.Compiler.BlockAccumulator.AccumulateBlock(IEnumerator`1 enumerator, BlockAccumulatorContext context) +411
HandlebarsDotNet.Compiler.<ConvertTokens>d__3.MoveNext() +389
System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) +333
System.Linq.Enumerable.ToList(IEnumerable`1 source) +58
HandlebarsDotNet.Compiler.BlockAccumulator.Accumulate(IEnumerable`1 tokens, HandlebarsConfiguration configuration) +97
HandlebarsDotNet.Compiler.ExpressionBuilder.ConvertTokensToExpressions(IEnumerable`1 tokens) +268
HandlebarsDotNet.Compiler.HandlebarsCompiler.CompileView(String templatePath) +576
HandlebarsDotNet.HandlebarsEnvironment.CompileView(String templatePath) +101
The partial block expression works fine when the extra whitespace is removed. 🎉
{{#>myPartial}}
Failover content
{{/myPartial}}
Back story: It's my first time using this library today - thank you, it's great!! I'm totally happy to contribute back a PR for this one, if you have any pointers on where to look? (I'm currently digging around the Lexer/Parser classes.)
Thanks!
Reading from the Handlebars specs, the opening Partial Block expressions appear to allow whitespace.
http://handlebarsjs.com/partials.html#partial-block
This currently throws an exception, (I'm using the latest bleeding-edge build, v1.9.0-ci, from commit: a56efe8 - I haven't tested any other version/release).
Reached end of template before block expressionThe partial block expression works fine when the extra whitespace is removed. 🎉
Back story: It's my first time using this library today - thank you, it's great!! I'm totally happy to contribute back a PR for this one, if you have any pointers on where to look? (I'm currently digging around the Lexer/Parser classes.)
Thanks!