1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-07-02 10:13:16 +00:00

Refactored deserializers to remove unneeded deep copy

This commit is contained in:
Jeremy Ruston 2012-05-05 11:18:47 +01:00
parent a094dc4b29
commit dc104cdec4

View File

@ -3,11 +3,7 @@ title: $:/core/modules/deserializers.js
type: application/javascript type: application/javascript
module-type: tiddlerdeserializer module-type: tiddlerdeserializer
Represents the dependencies of a tiddler or a parser node as these fields: Plugins to deserialise tiddlers from a block of text
tiddlers: A hashmap of explicitly tiddler titles, with the value `false` if the dependency is skinny, and `true` if it is fat
dependentAll: True if there is an implicit skinny dependency on all available tiddlers
dependentOnContextTiddler: True if the node has a fat dependency on the current context tiddler
\*/ \*/
(function(){ (function(){
@ -17,17 +13,15 @@ Represents the dependencies of a tiddler or a parser node as these fields:
"use strict"; "use strict";
exports["text/plain"] = function(text,fields) { exports["text/plain"] = function(text,fields) {
return [$tw.utils.extendDeepCopy(fields,{ fields.text = text;
text: text, fields.type = "text/plain";
type: "text/plain" return [fields];
})];
}; };
exports["text/html"] = function(text,fields) { exports["text/html"] = function(text,fields) {
return [$tw.utils.extendDeepCopy(fields,{ fields.text = text;
text: text, fields.type = "text/html";
type: "text/html" return [fields];
})];
}; };
})(); })();