fix: put blank lines around changelog headings on the card - #63
Merged
Conversation
GoReleaser release bodies pack headings tight against their lists (## Changelog\n### New features\n* ...), and markdownToLines only ever collapsed blank lines, never added its own — so on the card the section headings sat flush against the bullets with no air at all. The heading branch now emits a blank row on both sides through the existing emitBlank collapse: a body whose author already wrote the blanks comes out unchanged, and a heading that converts to nothing still yields exactly one blank. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
GoReleaser writes release bodies with no blank lines at all —
## Changelog/### New features/### Bug fixessit flush against their bullet lists.markdownToLinesonly ever collapsed blank runs and never inserted its own, so on the card the whole changelog rendered as one dense block (keepkit's own release card is the screenshot case).Fix
The heading branch in
markdownToLinesnow calls the existingemitBlank()before and after emitting a heading.emitBlankis idempotent (adds a blank only when the previous line is non-empty, drops leading ones), so:mdEmitInline;Tests
headings h1 to h6andTestMarkdownToLinesGitHubBodyexpectations updated for the new spacing.packed headings get air on both sides(the GoReleaser shape) andauthored blanks around headings do not double— both pin identical output for the packed and pre-formatted variants.emitBlankcalls turns all three assertions red.Preflight green: build / vet /
test -race/ golangci-lint.