Improve mfm link
This commit is contained in:
@@ -2,6 +2,7 @@ import Vue, { VNode } from 'vue';
|
||||
import { MfmForest } from '../../mfm/types';
|
||||
import { parse, parsePlain } from '../../mfm/parse';
|
||||
import MkUrl from './url.vue';
|
||||
import MkLink from './link.vue';
|
||||
import MkMention from './mention.vue';
|
||||
import { concat } from '../../prelude/array';
|
||||
import MkFormula from './formula.vue';
|
||||
@@ -158,14 +159,12 @@ export default Vue.component('misskey-flavored-markdown', {
|
||||
}
|
||||
|
||||
case 'link': {
|
||||
return [createElement('a', {
|
||||
attrs: {
|
||||
class: 'link _link',
|
||||
href: token.node.props.url,
|
||||
return [createElement(MkLink, {
|
||||
key: Math.random(),
|
||||
props: {
|
||||
url: token.node.props.url,
|
||||
rel: 'nofollow noopener',
|
||||
target: '_blank',
|
||||
title: token.node.props.url,
|
||||
}
|
||||
},
|
||||
}, genEl(token.children))];
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user