Consider multi-user mentions in 'What's new' (#471)

This commit is contained in:
scb261 2020-11-29 22:45:43 +02:00 committed by GitHub
parent 7b621d2ac3
commit 8f807b0e92

View File

@ -29,8 +29,8 @@ export default {
try {
const { data } = await this.$store.dispatch("getStableReleaseData");
this.$data.whatsNew = marked(data.body).replace(
/\(@(.*?)\)/g,
"(<a href='https://github.com/$1' target='_blank' rel='noopener'>@$1</a>)"
/(?<=\(|(, ))@(.*?)(?=\)|(, ))/g,
"<a href='https://github.com/$2' target='_blank' rel='noopener'>@$2</a>"
);
} catch (e) {
console.error(e);