From cb9b3c00dd9597ccf6a1808a4792c2a6e1f45d9a Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 20 Oct 2018 09:34:34 +0900 Subject: [PATCH] Use router-link instead of a to improve usability --- .../views/components/misskey-flavored-markdown.ts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/client/app/common/views/components/misskey-flavored-markdown.ts b/src/client/app/common/views/components/misskey-flavored-markdown.ts index 1390e7b284..d36a0a3714 100644 --- a/src/client/app/common/views/components/misskey-flavored-markdown.ts +++ b/src/client/app/common/views/components/misskey-flavored-markdown.ts @@ -114,10 +114,9 @@ export default Vue.component('misskey-flavored-markdown', { } case 'mention': { - return (createElement as any)('a', { + return (createElement as any)('router-link', { attrs: { - href: `${url}/${token.canonical}`, - target: '_blank', + to: `/${token.canonical}`, dataIsMe: (this as any).i && getAcct((this as any).i) == getAcct(token), style: 'color:var(--mfmMention);' }, @@ -129,10 +128,9 @@ export default Vue.component('misskey-flavored-markdown', { } case 'hashtag': { - return [createElement('a', { + return [createElement('router-link', { attrs: { - href: `${url}/tags/${encodeURIComponent(token.hashtag)}`, - target: '_blank', + to: `/tags/${encodeURIComponent(token.hashtag)}`, style: 'color:var(--mfmHashtag);' } }, token.content)];