mirror of
https://github.com/pantor/inja.git
synced 2026-11-06 01:09:24 +00:00
add index1, readme table
This commit is contained in:
1 parent
df8764f70b
commit
15dd94e1c5
2 files changed
+10
-5
No files matched your search
@@ -407,6 +407,7 @@ public:
|
||||
json data_loop = data;
|
||||
data_loop[item_name] = list[i];
|
||||
data_loop["index"] = i;
|
||||
data_loop["index1"] = i + 1;
|
||||
data_loop["is_first"] = (i == 0);
|
||||
data_loop["is_last"] = (i == list.size() - 1);
|
||||
result += render_tree(element["children"], data_loop, path);
|
||||
|
||||
Reference in new issue
Block a user