mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-06-04 03:32:17 +00:00
Prettify JSON
This commit is contained in:
@@ -395,7 +395,7 @@ $tw.plugins.dropbox.saveTiddlerIndex = function(path,callback) {
|
||||
}
|
||||
});
|
||||
// Save everything to a tiddler
|
||||
$tw.wiki.addTiddler({title: $tw.plugins.dropbox.titleTiddlerIndex, type: "application/json", text: JSON.stringify(index)},true);
|
||||
$tw.wiki.addTiddler({title: $tw.plugins.dropbox.titleTiddlerIndex, type: "application/json", text: JSON.stringify(index,null,$tw.config.preferences.jsonSpaces)},true);
|
||||
// Generate the index file
|
||||
var file = $tw.wiki.renderTiddler("text/plain",$tw.plugins.dropbox.titleAppIndexTemplate);
|
||||
// Save the index to Dropbox
|
||||
|
||||
@@ -512,7 +512,7 @@ TiddlyWebSyncer.prototype.convertTiddlerToTiddlyWebFormat = function(title) {
|
||||
if(result.type === "text/x-tiddlywiki") {
|
||||
result.type = null;
|
||||
}
|
||||
return JSON.stringify(result);
|
||||
return JSON.stringify(result,null,$tw.config.preferences.jsonSpaces);
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user