possible fix to "double new lines"

This commit is contained in:
azivner 2017-08-23 20:35:47 -04:00
parent f19c972d26
commit 36e5259527

View file

@ -1,4 +1,7 @@
function html2notecase(contents, note) {
// remove any possible extra newlines which might be inserted - all relevant new lines should be only in <br> and <p>
contents = contents.replace(/(?:\r\n|\r|\n)/, '');
contents = contents.replace(/<br \/>/g, '\n');
contents = contents.replace(/<br>/g, '\n');
contents = contents.replace(/<\/p>/g, '\n');