1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-23 10:07:19 +00:00

Fix for .tid files that are missing a double line break

This commit is contained in:
Jeremy Ruston 2012-12-20 09:20:44 +00:00
parent a0155763ed
commit a4d16488f0

View File

@ -677,11 +677,13 @@ $tw.modules.define("$:/boot/tiddlerdeserializer/js","tiddlerdeserializer",{
$tw.modules.define("$:/boot/tiddlerdeserializer/tid","tiddlerdeserializer",{
"application/x-tiddler": function(text,fields) {
var split = text.split(/\r?\n\r?\n/mg);
if(split.length > 1) {
if(split.length >= 1) {
fields = $tw.utils.parseFields(split[0],fields);
}
if(split.length >= 2) {
fields.text = split.slice(1).join("\n\n");
} else {
fields.text = text;
fields.text = "";
}
return [fields];
}