mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-12-04 15:58:05 +00:00
Get rid of more vestiges of the old empty generation mechanism
This commit is contained in:
@@ -611,19 +611,14 @@ exports.callSaver = function(method /*, args */ ) {
|
||||
|
||||
/*
|
||||
Save the wiki contents. Options are:
|
||||
saveEmpty: causes the wiki to be saved without any content
|
||||
template: the tiddler containing the template to save
|
||||
downloadType: the content type for the saved file
|
||||
*/
|
||||
exports.saveWiki = function(options) {
|
||||
options = options || {};
|
||||
var template = options.template || "$:/core/templates/tiddlywiki5.template.html",
|
||||
downloadType = options.downloadType || "text/plain",
|
||||
renderOptions = {};
|
||||
renderOptions["with"] = options.saveEmpty ?
|
||||
[undefined,"[!is[shadow]is[shadow]]"] :
|
||||
[undefined,"[!is[shadow]]"];
|
||||
var text = this.renderTiddler(downloadType,template,renderOptions);
|
||||
downloadType = options.downloadType || "text/plain";
|
||||
var text = this.renderTiddler(downloadType,template);
|
||||
this.callSaver("save",text);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user