kopia lustrzana https://github.com/miklobit/TiddlyWiki5
Minor optimisation to the list macro
By moving the compiling of the template outside of the main loopprint-window-tiddler
rodzic
bc16400ef2
commit
14e252590c
|
@ -61,10 +61,11 @@ exports.macro = {
|
|||
if(tiddlers.length === 0) {
|
||||
return params.emptyMessage ? encoder(params.emptyMessage) : "";
|
||||
} else {
|
||||
var fn = store.compileText(templateType,templateText,type);
|
||||
pushTag("<ul>");
|
||||
for(t=0; t<tiddlers.length; t++) {
|
||||
pushTag("<li>");
|
||||
output.push(store.renderText(templateType,templateText,type,tiddlers[t]));
|
||||
output.push(fn(store.getTiddler(tiddlers[t]),store,utils));
|
||||
pushTag("</li>");
|
||||
}
|
||||
pushTag("</ul>");
|
||||
|
|
Ładowanie…
Reference in New Issue