mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-23 10:07:19 +00:00
Minor optimisation to the list macro
By moving the compiling of the template outside of the main loop
This commit is contained in:
parent
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>");
|
||||
|
Loading…
Reference in New Issue
Block a user