From 1d35087f29d5d5c1f4ab5cc1d0d99bf4b15b5f7b Mon Sep 17 00:00:00 2001 From: Devin Weaver Date: Thu, 4 Feb 2016 18:31:24 -0500 Subject: [PATCH] Add additional fields support for evernote plugin Relates to Issue #2268 Add the additional field defined in the XML as properties to the result. This also appears to capture the 'author' field. --- plugins/tiddlywiki/evernote/modules/enex-deserializer.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/tiddlywiki/evernote/modules/enex-deserializer.js b/plugins/tiddlywiki/evernote/modules/enex-deserializer.js index ce880fdf9..698d532f8 100644 --- a/plugins/tiddlywiki/evernote/modules/enex-deserializer.js +++ b/plugins/tiddlywiki/evernote/modules/enex-deserializer.js @@ -34,11 +34,15 @@ exports["application/enex+xml"] = function(text,fields) { // Get all the "note" nodes var noteNodes = doc.querySelectorAll("note"); $tw.utils.each(noteNodes,function(noteNode) { - results.push({ + var result = { title: noteNode.querySelector("title").textContent, type: "text/html", text: noteNode.querySelector("content").textContent + }; + $tw.utils.each(noteNodes.querySelector("note-attributes").childNodes,function(attrNode) { + result[attrNode.tagName] = attrNode.textContent; }); + results.push(result); }); // Return the output tiddlers return results;