diff --git a/CHANGELOG.md b/CHANGELOG.md index c4c15fd246..bc3595126b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,10 +4,10 @@ ## What's Changed ### Bug Fixes 🛠 -* Fix typing errors for Quill.register by @hzgotb in https://github.com/quilljs/quill/pull/4127 -* Fix event source when deleting a link with shortcuts by @luin in https://github.com/quilljs/quill/pull/4200 -* Avoid side effects for Enter/Backspace when composing in Safari by @luin in https://github.com/quilljs/quill/pull/4201 -* Ignore pasting images when image format is disallowed by @luin in https://github.com/quilljs/quill/pull/4202 +* Fix typing errors for Quill.register by [@hzgotb](https://github.com/hzgotb) in https://github.com/quilljs/quill/pull/4127 +* Fix event source when deleting a link with shortcuts by [@luin](https://github.com/luin) in https://github.com/quilljs/quill/pull/4200 +* Avoid side effects for Enter/Backspace when composing in Safari by [@luin](https://github.com/luin) in https://github.com/quilljs/quill/pull/4201 +* Ignore pasting images when image format is disallowed by [@luin](https://github.com/luin) in https://github.com/quilljs/quill/pull/4202 [All changes](https://github.com/quilljs/quill/releases/tag/v2.0.2) diff --git a/scripts/changelog.mjs b/scripts/changelog.mjs index 07a3596d16..8fc3774a1e 100644 --- a/scripts/changelog.mjs +++ b/scripts/changelog.mjs @@ -29,7 +29,7 @@ if (currentChangeLog.includes(`# ${release.tagName}`)) { await configGit(); -const filteredReleaseNote = (note) => { +const normalizeReleaseNote = (note) => { const ignoreSections = [ "## new contributors", "## all changes", @@ -41,7 +41,12 @@ const filteredReleaseNote = (note) => { note = note.slice(0, index).replace(/#\s*$/, ""); } }); - return note.trim(); + + return note + .replace(/by @([-\w]+)/g, (_, username) => { + return `by [@${username}](https://github.com/${username})`; + }) + .trim(); }; const formatDate = (date) => { @@ -53,7 +58,7 @@ const { body } = JSON.parse( (await $`gh release view ${release.tagName} --json=body`).stdout ); -const note = `# ${release.tagName} (${formatDate(new Date(release.publishedAt))})\n\n${filteredReleaseNote(body)}\n\n[All changes](https://github.com/quilljs/quill/releases/tag/${release.tagName})\n`; +const note = `# ${release.tagName} (${formatDate(new Date(release.publishedAt))})\n\n${normalizeReleaseNote(body)}\n\n[All changes](https://github.com/quilljs/quill/releases/tag/${release.tagName})\n`; await writeFile(changeLogFilePath, `${note}\n${currentChangeLog}`);