From 87fa7f972cae859c466dea8a531d50f060e7d910 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Tue, 18 Oct 2016 09:18:56 +0100 Subject: [PATCH] Ensure global macros are available in modals and notifications --- core/modules/wiki.js | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/core/modules/wiki.js b/core/modules/wiki.js index 7a29df022..4628e5acc 100755 --- a/core/modules/wiki.js +++ b/core/modules/wiki.js @@ -911,13 +911,26 @@ exports.makeTranscludeWidget = function(title,options) { type: "element", tag: "div", children: [{ - type: "transclude", - attributes: { - tiddler: { - name: "tiddler", - type: "string", - value: title}}, - isBlock: !options.parseAsInline}]} + type: "importvariables", + attributes: { + filter: { + name: "filter", + type: "string", + value: "[[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]" + } + }, + tag: "$importvariables", + isBlock: false, + children: [{ + type: "transclude", + attributes: { + tiddler: { + name: "tiddler", + type: "string", + value: title}}, + isBlock: !options.parseAsInline} + ] + }]} ]}; if(options.field) { parseTree.tree[0].children[0].attributes.field = {type: "string", value: options.field};