Skip to content

Write each paragraph of the GitHub release text on one line - #91

Merged
wu-sheng merged 1 commit into
mainfrom
release-notes-unwrap
Oct 26, 2026
Merged

wu-sheng merged 1 commit into
mainfrom
release-notes-unwrap

Conversation

@wu-sheng

Copy link
Copy Markdown
Member

A GitHub release draws every line break as a break. changes.md wraps its lines, which a Markdown page reads as one paragraph, so the release pages broke sentences in the middle: 662 <br> on 0.6.0, and 351, 147 and 88 on 0.3.0, 0.4.0 and 0.5.0.

  • tools/release/release.sh: release_text passes the changelog through a new unwrap_lines, which joins the lines of each paragraph and list item with one space, as Markdown reads them. A blank line and a new list item start a new line. Headings, table rows, quotes, HTML lines, rules, fenced code blocks and hard breaks stay as they are. changes.md itself stays wrapped.
  • tools/test/release-publish/publish_test.go: the fixture changelog now has a wrapped paragraph, a wrapped list item with a nested item and a second paragraph, a hard break, a fenced code block and a table, and the fake gh checks each in the text publish sends. With the old pipeline the test fails.
  • The release guide and the changelog say so.

The four published release pages were written again with this unwrap_lines, from their own text. On each, the text with all white space collapsed is the same as before, the counts of list items and headings are the same, the rendered page has no <br> left, and the text of the rendered page is the same apart from the breaks. Nothing else of the releases changed: title, assets, prerelease state and the Latest label. The changelog part of the 0.6.0 page is byte for byte what this release_text writes from the tag.

go test ./tools/test/release-publish/... and the docs tests in ./tests pass.

A GitHub release draws every line break as a break. changes.md wraps
its lines, which a Markdown page reads as one paragraph, so the release
pages broke sentences in the middle: 662 times on 0.6.0, and 351, 147
and 88 times on 0.3.0, 0.4.0 and 0.5.0.

publish now joins the lines of each paragraph and list item. A blank
line and a new list item start a new line. Headings, tables, quotes,
HTML, rules, fenced code and hard breaks stay as they are. The test's
changelog has each of these, and fails with the old text.
@wu-sheng wu-sheng added this to the 0.7.0 milestone Oct 26, 2026
@wu-sheng
wu-sheng merged commit 9190944 into main Oct 26, 2026
24 checks passed
@wu-sheng
wu-sheng deleted the release-notes-unwrap branch October 26, 2026 07:50
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.

1 participant