ykmnkmi / jinja.dart

Jinja2 template engine port for Dart.
https://pub.dev/packages/jinja
MIT License
52 stars 11 forks source link

tuple of map in for statement #14

Closed lindeer closed 2 years ago

lindeer commented 2 years ago

Many template libs support tuple iteration of map in 'for' statement, just like: {% for type, style in config.styles %} and data is {"config":{"style":{"www":"styles/www.css"}}}, but jinja.dart consider
key as map iterator instead of MapEntry, I think entry is a better solution and find it easy to implement it, so I create a PR, could this feature be considered?