From 3e4515c460ea4e95c7fd4aa882bbd26d64060c80 Mon Sep 17 00:00:00 2001 From: Soitora Date: Tue, 15 Sep 2020 09:30:21 +0200 Subject: [PATCH] Hyperlink credited users in the downloads page (#347) * Regex add in hyperlinked authors * Make the regex lazy So it doesn't get greedy and try to match from the first parenthesis to the very last. --- src/.vuepress/components/WhatsNew.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/.vuepress/components/WhatsNew.vue b/src/.vuepress/components/WhatsNew.vue index 4c74d024..ed1dbdff 100644 --- a/src/.vuepress/components/WhatsNew.vue +++ b/src/.vuepress/components/WhatsNew.vue @@ -24,7 +24,10 @@ export default { async mounted() { try { const { data } = await this.$store.dispatch("getStableReleaseData"); - this.$data.whatsNew = marked(data.body); + this.$data.whatsNew = marked(data.body).replace( + /\(@(.*?)\)/g, + "(@$1)" + ); } catch (e) { console.error(e); }