1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-12-24 00:50:28 +00:00

Refactored view macro

Now we use renderTiddler when we can for wikified fields
This commit is contained in:
Jeremy Ruston 2012-02-11 18:19:34 +00:00
parent 8f4f8ae65f
commit a20c9cc8ac

View File

@ -28,7 +28,11 @@ exports.macro = {
case "link":
return store.renderMacro("link",type,tiddler,{target: v},encoder(v));
case "wikified":
return store.renderTiddler(type,tiddler.title); // Should be return store.renderText("text/x-tiddlywiki",v,type);
if(params.field === "text") {
return store.renderTiddler(type,tiddler.title);
} else {
return store.renderText("text/x-tiddlywiki",v,type,tiddler.title);
}
case "date":
var template = params.template || "DD MMM YYYY";
return encoder(utils.formatDateString(v,template));