Is there an existing issue for this?
Description of the bug
When using the --prepend option to insert new content at the top of an existing changelog file, there is no blank line between the newly prepended block and the original content. This causes the two sections to run into each other without the expected spacing.
This is especially obvious when both the prepended block (e.g., new generated changelog entries) and the old content (previous changelog) have headings: they appear directly one after another, harming readability.
Steps To Reproduce
- Generate a changelog with git-cliff and output it to a file (e.g., CHANGELOG.md)
- Make additional commits
- Run git-cliff again with --prepend CHANGELOG.md to add new changes
- Open the file and note there is no blank line between the new section at the top and the previous content.
Expected behavior
There should be at least one blank line (newline) between the prepended (newly generated) content and the existing content in the changelog file when using --prepend. This would ensure the new section is visually separated and readable.
Screenshots / Logs
No response
Software information
- Operating system: fedora 42
- Rust version: N/A
- Project version: 2.13.1
Additional context
Workarounds in the configuration or template body don't reliably solve this. Fixing the join in the implementation of --prepend is more robust. See discussion: #712
Is there an existing issue for this?
Description of the bug
When using the --prepend option to insert new content at the top of an existing changelog file, there is no blank line between the newly prepended block and the original content. This causes the two sections to run into each other without the expected spacing.
This is especially obvious when both the prepended block (e.g., new generated changelog entries) and the old content (previous changelog) have headings: they appear directly one after another, harming readability.
Steps To Reproduce
Expected behavior
There should be at least one blank line (newline) between the prepended (newly generated) content and the existing content in the changelog file when using --prepend. This would ensure the new section is visually separated and readable.
Screenshots / Logs
No response
Software information
Additional context
Workarounds in the configuration or template body don't reliably solve this. Fixing the join in the implementation of --prepend is more robust. See discussion: #712