mirror of
https://github.com/tachiyomiorg/website.git
synced 2024-12-22 08:01:58 +01:00
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.
This commit is contained in:
parent
3ea9745d4d
commit
3e4515c460
@ -24,7 +24,10 @@ export default {
|
|||||||
async mounted() {
|
async mounted() {
|
||||||
try {
|
try {
|
||||||
const { data } = await this.$store.dispatch("getStableReleaseData");
|
const { data } = await this.$store.dispatch("getStableReleaseData");
|
||||||
this.$data.whatsNew = marked(data.body);
|
this.$data.whatsNew = marked(data.body).replace(
|
||||||
|
/\(@(.*?)\)/g,
|
||||||
|
"(<a href='https://github.com/$1' target='_blank' rel='noopener'>@$1</a>)"
|
||||||
|
);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user