mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-10-19 17:57:38 +00:00
Update setTiddlerData() to preserve tiddler dictionaries
Previously, data tiddlers were always being saved in JSON format, regardless of the original format.
This commit is contained in:
@@ -436,4 +436,15 @@ exports.base64Decode = function(string64) {
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
Convert a hashmap into a tiddler dictionary format sequence of name:value pairs
|
||||
*/
|
||||
exports.makeTiddlerDictionary = function(data) {
|
||||
var output = [];
|
||||
for(var name in data) {
|
||||
output.push(name + ": " + data[name]);
|
||||
}
|
||||
return output.join("\n");
|
||||
};
|
||||
|
||||
})();
|
||||
|
Reference in New Issue
Block a user