From 8d48e4c76e39f5f3bdcd255bdb0418e6b3573533 Mon Sep 17 00:00:00 2001 From: tamaina Date: Sun, 31 May 2020 12:57:21 +0900 Subject: [PATCH] feat(client): Convert text mfm node to text (v)dom node instead of span tag (#6399) * Convert text mfm node to text (v)dom node instead of span tag * Update mfm.ts Co-authored-by: syuilo --- src/client/components/mfm.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/client/components/mfm.ts b/src/client/components/mfm.ts index bfef80f23..122368f74 100644 --- a/src/client/components/mfm.ts +++ b/src/client/components/mfm.ts @@ -1,5 +1,5 @@ import Vue, { VNode } from 'vue'; -import { MfmForest } from '../../mfm/types'; +import { MfmForest } from '../../mfm/prelude'; import { parse, parsePlain } from '../../mfm/parse'; import MkUrl from './url.vue'; import MkLink from './link.vue'; @@ -53,11 +53,11 @@ export default Vue.component('misskey-flavored-markdown', { if (!this.plain) { const x = text.split('\n') - .map(t => t == '' ? [createElement('br')] : [createElement('span', t), createElement('br')]); + .map(t => t == '' ? [createElement('br')] : [this._v(t), createElement('br')]); // NOTE: this._vはHACK SEE: https://github.com/syuilo/misskey/pull/6399#issuecomment-632820283 x[x.length - 1].pop(); return x; } else { - return [createElement('span', text.replace(/\n/g, ' '))]; + return [this._v(text.replace(/\n/g, ' '))]; } }