Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
formatting fix/hack
azivnerf20717e29f95
diff --git a/static/js/html2notecase.js b/static/js/html2notecase.jsindex 0482a35386..59531083f2 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 <br> and <p>contents = contents.replace(/(?:\r\n|\r|\n)/, '');+ // some editors insert this font stuff which messes up parsing by doubling newlines+ contents = contents.replace(/<font[^>]*>/g, '');+ contents = contents.replace(/<\/font>/g, '');contents = contents.replace(/<br><\/p>/g, '\n');contents = contents.replace(/<p><br><\/p>/g, '\n');contents = contents.replace(/<br \/>/g, '\n');