mirror of
				https://github.com/Jermolene/TiddlyWiki5
				synced 2025-10-31 15:42:59 +00:00 
			
		
		
		
	Merge pull request #2275 from Marxsal/patch-9
ENEX import - Apply modified (updated) dates
This commit is contained in:
		| @@ -38,11 +38,19 @@ exports["application/enex+xml"] = function(text,fields) { | ||||
| 			title: getTextContent(noteNode,"title"), | ||||
| 			type: "text/html", | ||||
| 			tags: [], | ||||
| 			text: getTextContent(noteNode,"content") | ||||
| 			text: getTextContent(noteNode,"content"), | ||||
| 			modified: getTextContent(noteNode,"created").replace("T","").replace("Z",""), | ||||
| 			created:  getTextContent(noteNode,"created").replace("T","").replace("Z","") | ||||
|  | ||||
| 		}; | ||||
| 		$tw.utils.each(noteNode.querySelectorAll("tag"),function(tagNode) { | ||||
| 			result.tags.push(tagNode.textContent); | ||||
| 		}); | ||||
| 		// If there's an update date, set modifiy date accordingly  | ||||
| 		$tw.utils.each(noteNode.querySelectorAll("updated"),function(modifiedNode) { | ||||
| 			result["modified"] = modifiedNode.textContent.replace("T","").replace("Z","") + "000" ;  | ||||
| 		}); | ||||
|  | ||||
| 		$tw.utils.each(noteNode.querySelectorAll("note-attributes"),function(attrNode) { | ||||
| 			result[attrNode.tagName] = attrNode.textContent; | ||||
| 		}); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Jeremy Ruston
					Jeremy Ruston