mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-23 18:17:20 +00:00
Fixed handling of "dependentAll" macros
Like <<list>>
This commit is contained in:
parent
3a98cc5389
commit
3560703078
@ -112,11 +112,12 @@ var parseMacroCall = function(w,name,paramString) {
|
|||||||
var macro = w.store.macros[name],
|
var macro = w.store.macros[name],
|
||||||
params = {};
|
params = {};
|
||||||
if(macro) {
|
if(macro) {
|
||||||
|
if(macro.dependentAll) {
|
||||||
|
w.addDependency(null);
|
||||||
|
}
|
||||||
var args = new ArgParser(paramString,{defaultName: "anon"}),
|
var args = new ArgParser(paramString,{defaultName: "anon"}),
|
||||||
insertParam = function(param,name,arg) {
|
insertParam = function(param,name,arg) {
|
||||||
if(param.dependantAll) {
|
if(param.type === "tiddler") {
|
||||||
w.addDependency(null);
|
|
||||||
} else if(param.type === "tiddler") {
|
|
||||||
w.addDependency(arg.evaluated ? null : arg.string);
|
w.addDependency(arg.evaluated ? null : arg.string);
|
||||||
}
|
}
|
||||||
params[name] = {type: arg.evaluated ? "eval" : "string", value: arg.string};
|
params[name] = {type: arg.evaluated ? "eval" : "string", value: arg.string};
|
||||||
|
@ -12,7 +12,7 @@ var utils = require("../Utils.js");
|
|||||||
exports.macro = {
|
exports.macro = {
|
||||||
name: "list",
|
name: "list",
|
||||||
types: ["text/html","text/plain"],
|
types: ["text/html","text/plain"],
|
||||||
dependantAll: true, // Tiddlers containing <<list>> macro are dependent on every tiddler
|
dependentAll: true, // Tiddlers containing <<list>> macro are dependent on every tiddler
|
||||||
params: {
|
params: {
|
||||||
type: {byName: "default", type: "text", optional: false},
|
type: {byName: "default", type: "text", optional: false},
|
||||||
template: {byName: true, type: "tiddler", optional: true},
|
template: {byName: true, type: "tiddler", optional: true},
|
||||||
|
Loading…
Reference in New Issue
Block a user