kopia lustrzana https://github.com/miklobit/TiddlyWiki5
Get rid of more vestiges of the old empty generation mechanism
rodzic
454f892cf2
commit
0dbe4c0291
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
};
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue