{% import 'macros.md.jinja' as macros %}
{% for entry in tree %}
## {% if entry.date %}{{ config.release_emoji }} {% endif %}{{ entry.version }}{% if entry.date %} ({{ entry.date }})
{% endif %}

{% for type, changes in entry.changes.items() %}
{% if type %}
### {{ type.emoji }} {{ type.heading }}

{% endif %}
{% if config.order_by_scope %}
{{ macros.render_changes_ordered_by_scope(changes) }}
{% elif config.group_by_scope %}
{{ macros.render_changes_grouped_by_scope(changes) }}
{% else %}
{{ macros.render_changes(changes) }}
{% endif %}
{% endfor %}
{% endfor %}
