From e3697e29bbc740220b6bfb9982518fa2f95a3258 Mon Sep 17 00:00:00 2001 From: "jeremy@jermolene.com" Date: Fri, 9 Sep 2022 10:22:06 +0100 Subject: [PATCH] When transcluding functions, pass an empty item list to the filter, and just return the first item --- core/modules/widgets/transclude.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/modules/widgets/transclude.js b/core/modules/widgets/transclude.js index a39e133df..205947c0c 100755 --- a/core/modules/widgets/transclude.js +++ b/core/modules/widgets/transclude.js @@ -223,7 +223,7 @@ TranscludeWidget.prototype.getTransclusionTarget = function() { variables[name] = param["default"]; } }); - var result = this.wiki.filterTiddlers(srcVariable.value,this.makeFakeWidgetWithVariables(variables)).join(""); + var result = this.wiki.filterTiddlers(srcVariable.value,this.makeFakeWidgetWithVariables(variables),this.wiki.makeTiddlerIterator([]))[0] || ""; parser = this.wiki.parseText(this.transcludeType,result || "",{parseAsInline: parseAsInline, configTrimWhiteSpace: srcVariable.configTrimWhiteSpace}); } else { // For macros and ordinary variables, wrap the parse tree in a vars widget assigning the parameters to variables named "__paramname__"