mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-26 19:47:20 +00:00
When we deserialize an unknown type as "text/plain" we should mark it with the original type
This commit is contained in:
parent
74e5e127c0
commit
a75fd3df34
@ -636,7 +636,7 @@ $tw.Wiki.prototype.deserializeTiddlers = function(type,text,srcFields) {
|
|||||||
fields[f] = srcFields[f];
|
fields[f] = srcFields[f];
|
||||||
}
|
}
|
||||||
if(deserializer) {
|
if(deserializer) {
|
||||||
return deserializer.call(this,text,fields);
|
return deserializer.call(this,text,fields,type);
|
||||||
} else {
|
} else {
|
||||||
// Return a raw tiddler for unknown types
|
// Return a raw tiddler for unknown types
|
||||||
fields.text = text;
|
fields.text = text;
|
||||||
@ -673,9 +673,9 @@ $tw.modules.define("$:/boot/tiddlerdeserializer/tid","tiddlerdeserializer",{
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
$tw.modules.define("$:/boot/tiddlerdeserializer/txt","tiddlerdeserializer",{
|
$tw.modules.define("$:/boot/tiddlerdeserializer/txt","tiddlerdeserializer",{
|
||||||
"text/plain": function(text,fields) {
|
"text/plain": function(text,fields,type) {
|
||||||
fields.text = text;
|
fields.text = text;
|
||||||
fields.type = "text/plain";
|
fields.type = type || "text/plain";
|
||||||
return [fields];
|
return [fields];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user