feat(for tag): Provide the counter 0 indexed to the context

Closes #121
This commit is contained in:
Kyle Fuller
2017-09-07 18:21:16 +01:00
parent 482d595d01
commit 7b9817ed50
4 changed files with 23 additions and 10 deletions

View File

@@ -114,6 +114,7 @@ class ForNode : NodeType {
"first": index == 0,
"last": index == (count - 1),
"counter": index + 1,
"counter0": index,
]
return try context.push(dictionary: ["forloop": forContext]) {