mirror of
https://github.com/paricafe/misskey.git
synced 2024-11-25 16:36:44 -06:00
fix #7444
This commit is contained in:
parent
89e7ef36dc
commit
7378c4a9d8
1 changed files with 7 additions and 4 deletions
|
@ -58,10 +58,13 @@ export default defineComponent({
|
||||||
const text = token.props.text.replace(/(\r\n|\n|\r)/g, '\n');
|
const text = token.props.text.replace(/(\r\n|\n|\r)/g, '\n');
|
||||||
|
|
||||||
if (!this.plain) {
|
if (!this.plain) {
|
||||||
const x = text.split('\n')
|
const res = [];
|
||||||
.map(t => t == '' ? [h('br')] : [t, h('br')]);
|
for (const t of text.split('\n')) {
|
||||||
x[x.length - 1].pop();
|
res.push(h('br'));
|
||||||
return x;
|
res.push(t);
|
||||||
|
}
|
||||||
|
res.shift();
|
||||||
|
return res;
|
||||||
} else {
|
} else {
|
||||||
return [text.replace(/\n/g, ' ')];
|
return [text.replace(/\n/g, ' ')];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue