Double newline at end of changelog #811
-
Not sure if it is a bug, or just me that haven't found the correct combination of newline settings. My CHANGELOG.md, always ends up with "\n\n" at the end of the file which I want to avoid as it triggers the markdown linter MD012. As a workaround I just added this to the end of my Changie config: replacements:
- path: CHANGELOG.md
find: "\n\n$"
replace: "\n" This does the trick, but should probably be the default behaviour. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
hm, I bet its a combination of a newline config having like +1 at the end of the version and the version itself having a newline at the end? Can I see the rest of your config? |
Beta Was this translation helpful? Give feedback.
-
Sure here you go: changesDir: .changes
unreleasedDir: unreleased
headerPath: header.tpl.md
changelogPath: CHANGELOG.md
versionExt: md
versionFormat: '## {{.Version}} - {{.Time.Format "2006-01-02"}}'
kindFormat: '### {{.Kind}}'
changeFormat: '- {{.Body}}'
kinds:
- label: Added
auto: minor
- label: Changed
auto: minor
- label: Deprecated
auto: minor
- label: Removed
auto: major
- label: Fixed
auto: patch
- label: Security
auto: patch
- label: Build
auto: patch
newlines:
afterChangelogHeader: 1
afterChangelogVersion: 1
beforeKind: 1
afterKind: 1
envPrefix: CHANGIE_
replacements:
- path: CHANGELOG.md
find: "\n\n$"
replace: "\n" |
Beta Was this translation helpful? Give feedback.
If you swap after changelog version with https://changie.dev/config/#newlinesconfig-beforechangelogversion you might be better off