mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-14 05:57:32 -07:00
fix #7444
This commit is contained in:
parent
67c8562122
commit
b9266cc36d
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');
|
||||
|
||||
if (!this.plain) {
|
||||
const x = text.split('\n')
|
||||
.map(t => t == '' ? [h('br')] : [t, h('br')]);
|
||||
x[x.length - 1].pop();
|
||||
return x;
|
||||
const res = [];
|
||||
for (const t of text.split('\n')) {
|
||||
res.push(h('br'));
|
||||
res.push(t);
|
||||
}
|
||||
res.shift();
|
||||
return res;
|
||||
} else {
|
||||
return [text.replace(/\n/g, ' ')];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue