mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-09-12 07:19:44 +00:00
![Jeremy Ruston](/assets/img/avatar_default.png)
Now each macro is in a separate file, and is implemented as a function, rather than being inlined into the compiled tiddler rendering function
27 lines
558 B
JavaScript
27 lines
558 B
JavaScript
/*\
|
|
title: js/macros/list.js
|
|
|
|
\*/
|
|
(function(){
|
|
|
|
/*jslint node: true */
|
|
"use strict";
|
|
|
|
var utils = require("../Utils.js");
|
|
|
|
exports.macro = {
|
|
name: "list",
|
|
types: ["text/html","text/plain"],
|
|
dependantAll: true, // Tiddlers containing <<list>> macro are dependent on every tiddler
|
|
params: {
|
|
type: {byName: "default", type: "text", optional: false},
|
|
template: {byName: true, type: "tiddler", optional: true},
|
|
emptyMessage: {byName: true, type: "text", optional: true}
|
|
},
|
|
code: function(type,tiddler,store,params) {
|
|
return "Listing!";
|
|
}
|
|
};
|
|
|
|
})();
|