Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion desktop/src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 24 additions & 4 deletions frontend/src/utils/changelog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,17 @@ export function parseChangelog(
const versionMatch = line.match(/^## (.+)/);
if (versionMatch) {
flush();
current = {
version: versionMatch[1].trim(),
items: [],
};
const version = versionMatch[1].trim();
// ``Unreleased`` is a staging area in CHANGELOG.md
// for entries waiting on the next bump-version run;
// it must not surface in the What's New dialog (it
// would show up as "What's New Unreleased" and steal
// the slot the real latest release should occupy).
if (/^unreleased$/i.test(version)) {
current = null;
continue;
}
current = { version, items: [] };
entries.push(current);
continue;
}
Expand All @@ -82,6 +89,19 @@ export function parseChangelog(
continue;
}

// A top-level ``- `` line starts a new item. The
// leading dash is dropped because the dialog renders
// its own bullet glyph in the outer ``<li>``; passing
// ``- text`` through to the Markdown component would
// produce a second nested bullet ("• •"). Indented
// continuation lines (`` more text``) are folded
// into the current item by the catch-all below.
if (/^- /.test(line)) {
flush();
buffer = line.replace(/^- /, "");
continue;
}

if (buffer === null) {
// Hold blank lines until real content appears so
// the first item doesn't start with a blank line.
Expand Down
Loading