My "Input" in this example is a list of a class called A (as returned by BuildTestData). Is there a way to access the index when using the alternate #Input syntax?
[Theory]
[InlineData("{{#each Input}}ii={{@index}} {{/each}}")] //Succeeds
[InlineData("{{#Input}}ii={{@index}} {{/Input}}")] //Fails
public void TestSingleLoopDictionary(string source)
{
var template = Handlebars.Compile(source);
var data = new
{
Input = BuildTestData()
};
var result = template(data);
Debug.WriteLine($"Source: {source}");
Debug.WriteLine($"Result: {result}");
Assert.Equal("ii=0 ii=1 ii=2 ", result);
}