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
8 changes: 4 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
11 changes: 8 additions & 3 deletions scripts/changelog.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ if (currentChangeLog.includes(`# ${release.tagName}`)) {

await configGit();

const filteredReleaseNote = (note) => {
const normalizeReleaseNote = (note) => {
const ignoreSections = [
"## new contributors",
"## all changes",
Expand All @@ -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) => {
Expand All @@ -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}`);

Expand Down