mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-14 14:07:38 -07:00
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 <Syuilotan@yahoo.co.jp>
This commit is contained in:
parent
2daf3c7a94
commit
78b0a33624
1 changed files with 3 additions and 3 deletions
|
@ -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, ' '))];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue