Get rid of more vestiges of the old empty generation mechanism

print-window-tiddler
Jeremy Ruston 2012-11-16 22:40:25 +00:00
rodzic 454f892cf2
commit 0dbe4c0291
2 zmienionych plików z 3 dodań i 10 usunięć

Wyświetl plik

@ -57,9 +57,7 @@ Command.prototype.execute = function() {
case "GET":
if(path === "/") {
response.writeHead(200, {"Content-Type": serveType});
var text = self.commander.wiki.renderTiddler(renderType,rootTiddler,{
"with": ["","[!is[shadow]]"]
});
var text = self.commander.wiki.renderTiddler(renderType,rootTiddler);
response.end(text, "utf8");
} else {
response.writeHead(404);

Wyświetl plik

@ -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);
};