-
Notifications
You must be signed in to change notification settings - Fork 128
Open
Description
Our project uses the setext_with_atx heading style for its changelogs:
Changelog for module
====================
1.0.0 (2024-09-03)
------------------
### New features
...Until towncrier 23.11.0 it worked properly with this configuration:
[tool.towncrier]
filename = "CHANGELOG.md"
underlines = ["-", "", ""]
title_format = "{version} ({project_date})" After upgrading to 24.7.0 or later the underlines option is ignored. That is caused by these lines:
towncrier/src/towncrier/build.py
Line 177 in 833647e
| is_markdown = template_extension.lower() == ".md" |
towncrier/src/towncrier/build.py
Lines 234 to 237 in 833647e
| if is_markdown: | |
| parts = [top_line] | |
| else: | |
| parts = [top_line, config.underlines[0] * len(top_line)] |
What this means is that the only way to get underlines in Markdown files is to:
- duplicate the Markdown template,
- rename it to something that does not end in
.md, and - specify that template in
towncrier.toml.
I think the rendered jinja output should not be modified in build.py. Any special behavior should be in the template itself, such that it becomes easier to override.
I'll create a pull request when I have time.
Metadata
Metadata
Assignees
Labels
No labels