Refactored macro parameter parsing

So that it happens during parsing, not compilation. This will enable us
to do the dependency tracking during parsing, and not wait until
compilation time
This commit is contained in:
Jeremy Ruston
2012-01-06 18:43:36 +00:00
parent 86bf495dec
commit 3d507c3bab
3 changed files with 50 additions and 37 deletions

View File

@@ -314,15 +314,18 @@ store.renderTiddler("text/html",templateTitle,tiddlerTitle)
WikiStore.prototype.renderTiddler = function(type,title,asTitle) {
var tiddler = this.getTiddler(title),
fn = this.compileTiddler(title,type);
if(asTitle) {
var asTiddler = this.getTiddler(asTitle);
return fn(asTiddler,this,utils);
} else {
if(!tiddler.renditions[type]) {
tiddler.renditions[type] = fn(tiddler,this,utils);
if(tiddler) {
if(asTitle) {
var asTiddler = this.getTiddler(asTitle);
return fn(asTiddler,this,utils);
} else {
if(!tiddler.renditions[type]) {
tiddler.renditions[type] = fn(tiddler,this,utils);
}
return tiddler.renditions[type];
}
return tiddler.renditions[type];
}
return null;
};
WikiStore.prototype.installMacros = function() {