diff --git a/src/renderer/App.js b/src/renderer/App.js index 2f58d730de73..68d30084e1bb 100644 --- a/src/renderer/App.js +++ b/src/renderer/App.js @@ -227,7 +227,17 @@ export default defineComponent({ .then((json) => { const tagName = json[0].tag_name const versionNumber = tagName.replace('v', '').replace('-beta', '') - this.updateChangelog = marked.parse(json[0].body) + + let changelog = json[0].body + // Link usernames to their GitHub profiles + .replaceAll(/@(\S+)\b/g, '[@$1](https://github.com/$1)') + // Shorten pull request links to #1234 + .replaceAll(/https:\/\/github\.com\/FreeTubeApp\/FreeTube\/pull\/(\d+)/g, '[#$1]($&)') + + // Add the title + changelog = `# ${json[0].name}\n${changelog}` + + this.updateChangelog = marked.parse(changelog) this.changeLogTitle = json[0].name this.updateBannerMessage = this.$t('Version {versionNumber} is now available! Click for more details', { versionNumber })