Refactor the Tiddler object to enforce immutability

And in the process move the fields out of the fields member
This commit is contained in:
Jeremy Ruston
2012-01-17 13:01:55 +00:00
parent 2ff603da0e
commit b898afe3e5
12 changed files with 120 additions and 88 deletions

View File

@@ -135,7 +135,7 @@ var commandLineSwitches = {
handler: function(args,callback) {
var recipe = [];
app.store.forEachTiddler(function(title,tiddler) {
var filename = encodeURIComponent(tiddler.fields.title.replace(/ /g,"_")) + ".tid";
var filename = encodeURIComponent(tiddler.title.replace(/ /g,"_")) + ".tid";
fs.writeFileSync(path.resolve(args[0],filename),tiddlerOutput.outputTiddler(tiddler),"utf8");
recipe.push("tiddler: " + filename + "\n");
});