1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-08-10 15:53:58 +00:00

Trim "template" value in saveWiki()

* Safeguard the code from extraneous whitespaces in transcluded result.
This commit is contained in:
Cindy Ruan 2021-04-02 17:20:04 -07:00
parent fadf6252d4
commit 6cdc80085c

View File

@ -157,8 +157,8 @@ SaverHandler.prototype.saveWiki = function(options) {
return false;
}
var variables = options.variables || {},
template = options.template ||
this.wiki.getTiddlerText("$:/config/SaveWikiButton/Template", "$:/core/save/all"),
template = (options.template ||
this.wiki.getTiddlerText("$:/config/SaveWikiButton/Template", "$:/core/save/all")).trim(),
downloadType = options.downloadType || "text/plain",
text = this.wiki.renderTiddler(downloadType,template,options),
callback = function(err) {