Skip to content

Commit

Permalink
Evernote preserve new lines
Browse files Browse the repository at this point in the history
  • Loading branch information
moughxyz committed Jul 26, 2017
1 parent 16afc17 commit 9982a3b
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions dist/sntools.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ var SNTools = function () {
var contentXmlString = xmlNote.getElementsByTagName("content")[0].childNodes[0].nodeValue;
var contentXml = this.loadXMLString(contentXmlString, "html");
var contentHTML = contentXml.getElementsByTagName("en-note")[0].innerHTML;
contentHTML = contentHTML.replace(/<br[^>]*>/g, "\n\n");
var text = this.strip(contentHTML);

var note = {
Expand Down
4 changes: 2 additions & 2 deletions dist/sntools.min.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/transpiled.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ var SNTools = function () {
var contentXmlString = xmlNote.getElementsByTagName("content")[0].childNodes[0].nodeValue;
var contentXml = this.loadXMLString(contentXmlString, "html");
var contentHTML = contentXml.getElementsByTagName("en-note")[0].innerHTML;
contentHTML = contentHTML.replace(/<br[^>]*>/g, "\n\n");
var text = this.strip(contentHTML);

var note = {
Expand Down
Loading

0 comments on commit 9982a3b

Please sign in to comment.