|
|
|
|
@ -1,7 +1,11 @@
|
|
|
|
|
function html2notecase(contents, note) {
|
|
|
|
|
//console.log("'" + contents + "'");
|
|
|
|
|
|
|
|
|
|
// 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><\/p>/g, '\n');
|
|
|
|
|
contents = contents.replace(/<p><br><\/p>/g, '\n');
|
|
|
|
|
contents = contents.replace(/<br \/>/g, '\n');
|
|
|
|
|
contents = contents.replace(/<br>/g, '\n');
|
|
|
|
|
contents = contents.replace(/<\/p>/g, '\n');
|
|
|
|
|
@ -144,7 +148,9 @@ function html2notecase(contents, note) {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//console.log(contents);
|
|
|
|
|
contents = contents.trim();
|
|
|
|
|
|
|
|
|
|
//console.log('"' + contents + '"');
|
|
|
|
|
|
|
|
|
|
note.detail.note_text = contents;
|
|
|
|
|
}
|