better handling of newlines which should hopefully eliminate new line duplication

This commit is contained in:
azivner
2017-08-25 20:40:33 -04:00
parent 1b3a113639
commit bf22cc55e1
2 changed files with 12 additions and 2 deletions

View File

@@ -43,7 +43,11 @@ function notecase2html(note) {
}
}
noteText = noteText.replace(/(?:\r\n|\r|\n)/g, '<br />');
noteText = noteText.replace(/(?:\r\n|\r)/g, '\n');
noteText = noteText.replace(/(.+)\n/g, '<p>$1</p>');
noteText = noteText.replace(/\n/g, '<p><br></p>');
noteText = noteText.replace(/ /g, '&nbsp;&nbsp;');