Update the recipe handling to use the right wiki object

print-window-tiddler
Jeremy Ruston 2012-06-14 11:36:10 +01:00
rodzic acad64a933
commit 6c285b04de
1 zmienionych plików z 3 dodań i 2 usunięć

Wyświetl plik

@ -15,7 +15,8 @@ The idea is to process the recipe file recursively, loading tiddlers into the ma
"use strict";
exports["application/x-tiddlywiki-recipe"] = function(text,fields) {
var path = require("path"),
var self = this,
path = require("path"),
fs = require("fs"),
tiddlers = [],
parseRecipe = function(text) {
@ -37,7 +38,7 @@ exports["application/x-tiddlywiki-recipe"] = function(text,fields) {
typeInfo = extensionInfo ? $tw.config.contentTypeInfo[extensionInfo.type] : null,
data = fs.readFileSync(sourcePath).toString(typeInfo ? typeInfo.encoding : "utf8"),
fields = {title: sourcePath},
tids = $tw.wiki.deserializeTiddlers(ext,data,fields),
tids = self.deserializeTiddlers(ext,data,fields),
metafile = sourcePath + ".meta";
if(ext !== ".json" && tids.length === 1 && path.existsSync(metafile)) {
var metadata = fs.readFileSync(metafile).toString("utf8");