Fix #2720
This commit is contained in:
@ -82,8 +82,12 @@ const handlers: { [key: string]: (window: any, token: any, mentionedRemoteUsers:
|
||||
|
||||
text({ document }, { content }) {
|
||||
const nodes = (content as string).split('\n').map(x => document.createTextNode(x));
|
||||
for (const x of intersperse(document.createElement('br'), nodes)) {
|
||||
document.body.appendChild(x);
|
||||
for (const x of intersperse('br', nodes)) {
|
||||
if (x === 'br') {
|
||||
document.body.appendChild(document.createElement('br'));
|
||||
} else {
|
||||
document.body.appendChild(x);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
Reference in New Issue
Block a user