From ad6e09f1cbb3a3918b6855c653bd6ea418317054 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Sat, 22 Jul 2023 14:01:24 +0100 Subject: [PATCH] Minor refactor transclude widget Preparing to fix #7592 --- core/modules/widgets/transclude.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/modules/widgets/transclude.js b/core/modules/widgets/transclude.js index 7b4b9581d..05d03a702 100755 --- a/core/modules/widgets/transclude.js +++ b/core/modules/widgets/transclude.js @@ -47,6 +47,8 @@ TranscludeWidget.prototype.execute = function() { this.sourceText = target.text; this.parserType = target.type; this.parseAsInline = target.parseAsInline; + // Set 'thisTiddler' + this.setVariable("thisTiddler",this.transcludeTitle); // Process the transclusion according to the output type switch(this.transcludeOutput || "text/html") { case "text/html": @@ -266,8 +268,6 @@ TranscludeWidget.prototype.getTransclusionTarget = function() { defaultType: this.transcludeType }); } - // Set 'thisTiddler' - this.setVariable("thisTiddler",this.transcludeTitle); // Return the parse tree if(parser) { return {