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.
Our project uses the setext_with_atx heading style for its changelogs:
Until towncrier 23.11.0 it worked properly with this configuration:
After upgrading to 24.7.0 or later the
underlines
option is ignored. That is caused by these lines: https://github.com/twisted/towncrier/blob/833647e31cde8fd68f0e53063b10e8f3ae4214c3/src/towncrier/build.py#L177 https://github.com/twisted/towncrier/blob/833647e31cde8fd68f0e53063b10e8f3ae4214c3/src/towncrier/build.py#L234-L237What this means is that the only way to get underlines in Markdown files is to:
.md
, andtowncrier.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.