Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix section depth in markdown template #664

Open
wants to merge 3 commits into
base: trunk
Choose a base branch
from

Conversation

flying-sheep
Copy link

@flying-sheep flying-sheep commented Aug 23, 2024

Description

Fixes #663

Checklist

  • Make sure changes are covered by existing or new tests.
  • For at least one Python version, make sure test pass on your local environment.
  • Create a file in src/towncrier/newsfragments/. Briefly describe your
    changes, with information useful to end users. Your change will be included in the public release notes.
  • Make sure all GitHub Actions checks are green (they are automatically checking all of the above).
  • Ensure docs/tutorial.rst is still up-to-date.

@flying-sheep flying-sheep marked this pull request as ready for review August 23, 2024 14:37
@flying-sheep flying-sheep requested a review from a team as a code owner August 23, 2024 14:37
Copy link
Member

@adiroiban adiroiban left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR.

Changes looks good... but this might be considered a backward incompatible change.

Users that already have NEWS files, will have them generated with H3 for previous releases.

I think that this might be ok, but we should communicate this change to end users.


I was expected to also see some updates to the test docstrings, to explain that the H2 render is important.


I hope that someone who cares about MD support in towncrier will have some time and do a review of this PR

@@ -0,0 +1 @@
Markdown template: Render category headers as h2 when no sections are present.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a small comment... and mauybe this should be a .removal type of fragment.

It should explain the existing users should manually update existing NEWS file to match the new H2 format.

Suggested change
Markdown template: Render category headers as h2 when no sections are present.
When no sections are present, the default Markdown template now renders the category headers as H2. In previous versions it was rendered as H3.

@flying-sheep
Copy link
Author

Hi @adiroiban, I commented a bit on the bigger problem here: #663

maybe you’d like to chime in there before I invest more time into this fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Markdown template skips h2 level when no section exists
2 participants