improve MFM to html
This commit is contained in:
parent
cad8e4dea2
commit
c0fbcee38a
|
@ -80,12 +80,12 @@ const handlers: { [key: string]: (window: any, token: any, mentionedRemoteUsers:
|
||||||
},
|
},
|
||||||
|
|
||||||
text({ document }, { content }) {
|
text({ document }, { content }) {
|
||||||
for (const text of content.split('\n')) {
|
const t = content.split('\n')
|
||||||
const node = document.createTextNode(text);
|
for (let i = 0; i < t.length; i++) {
|
||||||
document.body.appendChild(node);
|
document.body.appendChild(document.createTextNode(t[i]));
|
||||||
|
if (i != t.length - 1) {
|
||||||
const br = document.createElement('br');
|
document.body.appendChild(document.createElement('br'));
|
||||||
document.body.appendChild(br);
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue