wip
This commit is contained in:
parent
e0ffedca24
commit
c686a10472
7 changed files with 127 additions and 34 deletions
|
|
@ -33,7 +33,11 @@ export default Vue.component('mk-post-html', {
|
|||
.replace(/(\r\n|\n|\r)/g, '\n');
|
||||
|
||||
if ((this as any).shouldBreak) {
|
||||
return text.split('\n').map(t => [createElement('span', t), createElement('br')]);
|
||||
if (text.indexOf('\n') != -1) {
|
||||
return text.split('\n').map(t => [createElement('span', t), createElement('br')]);
|
||||
} else {
|
||||
return createElement('span', text);
|
||||
}
|
||||
} else {
|
||||
return createElement('span', text.replace(/\n/g, ' '));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue