1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-26 22:41:17 +02:00

Desktop: Fixes #8476: Text that is pasted in Rich Text editor had extra new lines

This commit is contained in:
Laurent Cozic
2023-07-27 14:48:41 +01:00
parent 35f375d756
commit b9659bb9c1
2 changed files with 78 additions and 7 deletions

View File

@@ -10,7 +10,31 @@ describe('htmlUtils', () => {
],
[
'line 1\nline 2',
'<p>line 1</p><p>line 2</p>',
'<p>line 1<br/>line 2</p>',
],
[
'one\n\ntwo\nthree\n\nfour',
'<p>one</p><p>two<br/>three</p><p>four</p>',
],
[
'\n\n',
'<br/><br/>',
],
[
'\n\none',
'<br/><p>one</p>',
],
[
'\none\ntwo\n',
'<p>one<br/>two</p>',
],
[
'one\n\n\ntwo',
'<p>one</p><br/><p>two</p>',
],
[
'one\n\n\n\ntwo',
'<p>one</p><br/><br/><p>two</p>',
],
[
'<img onerror="http://downloadmalware.com"/>',