Skip to content

fix: preserve markdown list formatting in changelog output#23

Merged
Gawdfrey merged 2 commits intomainfrom
fix/preserve-list-formatting
Mar 19, 2026
Merged

fix: preserve markdown list formatting in changelog output#23
Gawdfrey merged 2 commits intomainfrom
fix/preserve-list-formatting

Conversation

@Gawdfrey
Copy link
Copy Markdown
Member

Summary

When changeset descriptions use markdown list syntax (- item), the formatter wraps each entry in another - prefix, creating nested lists (- - item) that render as double-indented bullets on GitHub.

Before:

- - 🐛 **Bug** (credit-decision): Fix race condition
  - 🔌 **API** (party): Add error codes

After:

- 🐛 **Bug** (credit-decision): Fix race condition
- 🔌 **API** (party): Add error codes

Two changes in getReleaseLine:

  1. If firstLine already starts with - , don't prepend another -
  2. If a continuation line starts with - , keep it as a top-level bullet instead of indenting with

Plain text summaries (without - prefix) continue to work as before.

When changeset descriptions use markdown list syntax (- item), the
formatter was wrapping each entry in another - prefix, creating nested
lists (- - item) that render poorly on GitHub.

Now detects when the body already starts with "- " and preserves it.
Subsequent lines starting with "- " are also kept as top-level bullets
instead of being indented as continuations.
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Mar 19, 2026

🦋 Changeset detected

Latest commit: 5f7e8c8

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@stacc/changeset-formatter Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@Gawdfrey Gawdfrey merged commit a5b06fa into main Mar 19, 2026
@github-actions github-actions Bot mentioned this pull request Mar 19, 2026
@Gawdfrey Gawdfrey deleted the fix/preserve-list-formatting branch March 19, 2026 05:19
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