Skip to content
Snippets Groups Projects
Unverified Commit 8d48e4c7 authored by tamaina's avatar tamaina Committed by GitHub
Browse files

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: default avatarsyuilo <Syuilotan@yahoo.co.jp>
parent a1e0c866
No related branches found
No related tags found
No related merge requests found
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, ' '))];
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment