diff --git a/CHANGELOG.md b/CHANGELOG.md index f8eef4e..2cae0d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ All notable changes to this site are recorded here. The format follows ## [Unreleased] +### Fixed +- An app's "What's new" no longer shows a range of pull-request numbers such as "(#47–#50)", + which link nowhere on this site. LOGGER 1.7.0's notes on its page had two. + ## [1.8.1] — 2026-11-11 ### Changed diff --git a/releases/logger.md b/releases/logger.md index 8bb98d1..f00bf03 100644 --- a/releases/logger.md +++ b/releases/logger.md @@ -4,11 +4,11 @@ version: '1.7.0' date: 2026-11-11 url: https://github.com/itsdoubleem/Logger_app/releases/tag/v1.7.0 -source: b0dc6c359fde +source: 24345a418a41 --- -**New START and STOP button.** The punch button is now inspired by the app's clock icon, with START or STOP inside. (#47–#50) +**New START and STOP button.** The punch button is now inspired by the app's clock icon, with START or STOP inside. -**Undo a mistaken clock-in.** Right after START, a green strip under the punch card lets you undo the clock-in with one tap, for 9 seconds. (#46, #51–#53) +**Undo a mistaken clock-in.** Right after START, a green strip under the punch card lets you undo the clock-in with one tap, for 9 seconds. Wage calculation is unchanged. Records are kept: install over the existing app with `adb install -r`. diff --git a/tests/sync.test.ts b/tests/sync.test.ts index 17a8569..15e804a 100644 --- a/tests/sync.test.ts +++ b/tests/sync.test.ts @@ -45,6 +45,21 @@ test('notes lose PR numbers, the download link and hash, and CHANGELOG pointers' assert.equal(cleanNotes(null), ''); }); +test('notes lose ranges of PR numbers too', () => { + // LOGGER 1.7.0's real notes, which went live with both of these still in them. + assert.equal( + cleanNotes('The punch button is now inspired by the app\'s clock icon, with START or STOP inside. (#47–#50)'), + 'The punch button is now inspired by the app\'s clock icon, with START or STOP inside.', + ); + assert.equal(cleanNotes('Undo it with one tap, for 9 seconds. (#46, #51–#53)'), 'Undo it with one tap, for 9 seconds.'); + // A hyphen, an em dash, a bare second number and the PR prefix are all the same thing. + assert.equal(cleanNotes('Fixed (#46-#48).'), 'Fixed.'); + assert.equal(cleanNotes('Fixed (PR #46 — 48, #50).'), 'Fixed.'); + // Brackets that are not PR numbers stay: a year range, a lone hash, a dash with no number. + assert.equal(cleanNotes('Covers (2025–2026) and (#tag).'), 'Covers (2025–2026) and (#tag).'); + assert.equal(cleanNotes('Odd (#46–).'), 'Odd (#46–).'); +}); + test('notes are cut by the sentence, not the paragraph', () => { // HANGIL's real v1.0.2 notes: the install sentence stays, the link-and-hash one goes. const hangil = diff --git a/tools/sync-lib.mjs b/tools/sync-lib.mjs index d9bae18..943de27 100644 --- a/tools/sync-lib.mjs +++ b/tools/sync-lib.mjs @@ -57,7 +57,8 @@ export const kstDate = (iso) => new Date(new Date(iso).getTime() + 9 * 3600e3).t * · HTML tags and images go; a relative link keeps its words and loses the link (it * pointed into the app's repo); headings become bold lines, so they never sit as a * second h2 under "What's new"; - * · pull-request numbers — "(#32)", "(PR #33)", "(#31 and #32)" — link nowhere here; + * · pull-request numbers — "(#32)", "(PR #33)", "(#31 and #32)", "(#46, #51–#53)" — link + * nowhere here; * · GitHub's generated "What's Changed" furniture: the heading, "by @user in …/pull/N", * "**Full Changelog**: …", "New Contributors"; * · any sentence carrying a SHA-256, this site's address or CHANGELOG.md — HANGIL's notes @@ -78,7 +79,7 @@ export function cleanNotes(body) { .replace(/<\/?[a-zA-Z][\w-]*(?:\s[^<>]*)?\/?>/g, '') .replace(/\[([^\]]+)\]\((?!https?:\/\/)[^)]*\)/g, '$1') .replace(/ by @[\w-]+ in https:\/\/github\.com\/\S+/g, '') - .replace(/[ \t]*\((?:PR\s*)?#\d+(?:(?:,\s*|\s+and\s+)(?:PR\s*)?#\d+)*\)/g, ''); + .replace(/[ \t]*\((?:PR\s*)?#\d+(?:\s*[-–—]\s*#?\d+)?(?:(?:,\s*|\s+and\s+)(?:PR\s*)?#\d+(?:\s*[-–—]\s*#?\d+)?)*\)/g, ''); return text .split(/\n\s*\n/) .map((para) =>