Add tags support to evernote plugin

Relates to Issue #2268

I tried to map over the list of tags but NodeLists are not arrays and so
need to be converted. This looks ugly and probably should be abstracted
to a function. Come to think of it should we have a `$tw.utils.map()`
function?
This commit is contained in:
Devin Weaver 2016-02-04 19:24:46 -05:00
parent 4b70257aca
commit 4525a3d631
1 changed files with 1 additions and 0 deletions

View File

@ -37,6 +37,7 @@ exports["application/enex+xml"] = function(text,fields) {
var result = {
title: noteNode.querySelector("title").textContent,
type: "text/html",
tags: Array.prototype.slice.call(noteNode.querySelectorAll("tag")).map(function(tag) { return tag.textContent; }).join(","),
text: noteNode.querySelector("content").textContent
};
$tw.utils.each(noteNodes.querySelector("note-attributes").childNodes,function(attrNode) {