Skip to content

Commit

Permalink
fix: Keep a Changelog template: respect sections order (don't sort)
Browse files Browse the repository at this point in the history
This will allow library users to define their own sections order.
  • Loading branch information
pawamoy committed Jan 25, 2023
1 parent d33eda5 commit f645e62
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/git_changelog/templates/keepachangelog/version.md
Expand Up @@ -8,8 +8,10 @@
<small>[Compare with latest]({{ version.compare_url }})</small>
{%- endif %}

{% for type, section in version.sections_dict|dictsort -%}
{%- if type and type in changelog.style.DEFAULT_RENDER -%}
{% for type in changelog.style.DEFAULT_RENDER %}
{%- if type in version.sections_dict -%}
{%- with section = version.sections_dict[type] -%}
{% include 'section.md' with context %}
{% endif -%}
{%- endwith -%}
{%- endif -%}
{%- endfor -%}

0 comments on commit f645e62

Please sign in to comment.