From f20717e29f95a41d44addb8dab45b615a26580b6 Mon Sep 17 00:00:00 2001 From: azivner Date: Mon, 4 Sep 2017 18:55:09 -0400 Subject: [PATCH] formatting fix/hack --- static/js/html2notecase.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/static/js/html2notecase.js b/static/js/html2notecase.js index 0482a3538..59531083f 100644 --- a/static/js/html2notecase.js +++ b/static/js/html2notecase.js @@ -2,6 +2,9 @@ function html2notecase(contents, note) { // remove any possible extra newlines which might be inserted - all relevant new lines should be only in
and

contents = contents.replace(/(?:\r\n|\r|\n)/, ''); + // some editors insert this font stuff which messes up parsing by doubling newlines + contents = contents.replace(/]*>/g, ''); + contents = contents.replace(/<\/font>/g, ''); contents = contents.replace(/
<\/p>/g, '\n'); contents = contents.replace(/


<\/p>/g, '\n'); contents = contents.replace(/
/g, '\n');