mirror of
				https://github.com/Jermolene/TiddlyWiki5
				synced 2025-10-30 23:23:02 +00:00 
			
		
		
		
	Fixed wiki.saveWiki to pass the correct parameters to the template
This commit is contained in:
		| @@ -579,7 +579,8 @@ exports.callSaver = function(method /*, args */ ) { | |||||||
| }; | }; | ||||||
|  |  | ||||||
| /* | /* | ||||||
| Save the wiki contents | Save the wiki contents. Options are: | ||||||
|  | 	saveEmpty: causes the wiki to be saved without any content | ||||||
| 	template: the tiddler containing the template to save | 	template: the tiddler containing the template to save | ||||||
| 	downloadType: the content type for the saved file | 	downloadType: the content type for the saved file | ||||||
| */ | */ | ||||||
| @@ -587,7 +588,11 @@ exports.saveWiki = function(options) { | |||||||
| 	options = options || {}; | 	options = options || {}; | ||||||
| 	var template = options.template || "$:/core/templates/tiddlywiki5.template.html", | 	var template = options.template || "$:/core/templates/tiddlywiki5.template.html", | ||||||
| 		downloadType = options.downloadType || "text/plain", | 		downloadType = options.downloadType || "text/plain", | ||||||
| 		text = this.renderTiddler(downloadType,template); | 		renderOptions = {}; | ||||||
|  | 	renderOptions["with"] = options.saveEmpty ? | ||||||
|  | 								[undefined,"[!is[shadow]is[shadow]]"] : | ||||||
|  | 								[undefined,"[!is[shadow]]"]; | ||||||
|  | 	var text = this.renderTiddler(downloadType,template,renderOptions); | ||||||
| 	this.callSaver("save",text); | 	this.callSaver("save",text); | ||||||
| }; | }; | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Jeremy Ruston
					Jeremy Ruston