From 4217ee3cccce94d9c5d560117948dc1e0881aa06 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Sat, 17 Dec 2011 10:55:53 +0000 Subject: [PATCH] Fixed timeline macro to exclude tiddlers that lack the target field --- js/WikiTextRenderer.js | 37 ++++++++++++++++------------ tiddlywiki5/tiddlers/ThisIsAlpha.tid | 1 + 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/js/WikiTextRenderer.js b/js/WikiTextRenderer.js index c4a34332d..86a7dd688 100644 --- a/js/WikiTextRenderer.js +++ b/js/WikiTextRenderer.js @@ -190,22 +190,27 @@ WikiTextRenderer.macros = { var tiddler = tiddlers[t], theGroupParseTree = this.parser.processor.textProcessors.parse(groupTemplateType,groupTemplateText), theGroup = theGroupParseTree.render("text/plain",theGroupParseTree.children,this.store,tiddler); - - if(ul === undefined || theGroup != lastGroup) { - ul = {type: "ul", attributes: {"class": "timeline"}, children: []}; - macroNode.output.push(ul); - ul.children.push({type: "li", attributes: {"class": "listTitle"}, children: [{type: "text", value: theGroup}]}); - lastGroup = theGroup; - } - var item = {type: "li", attributes: {"class": "listLink"}, children: [ { - type: "context", - tiddler: tiddler, - children: [] - }]}; - ul.children.push(item); - var itemParseTree = this.parser.processor.textProcessors.parse(templateType,templateText); - for(var c=0; c