Skip to content

Commit

Permalink
Fix transclusion refresh
Browse files Browse the repository at this point in the history
Fixes #7441
  • Loading branch information
Jermolene committed May 9, 2023
1 parent 18d7d3d commit 9f1eab1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/modules/widgets/transclude.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ TranscludeWidget.prototype.execute = function() {
var target = this.getTransclusionTarget(),
parseTreeNodes = target.parseTreeNodes;
this.sourceText = target.text;
this.sourceType = target.type;
this.parserType = target.type;
this.parseAsInline = target.parseAsInline;
// Process the transclusion according to the output type
switch(this.transcludeOutput || "text/html") {
Expand All @@ -58,7 +58,7 @@ TranscludeWidget.prototype.execute = function() {
break;
default:
// text/plain
var plainText = this.wiki.renderText("text/plain",this.sourceType,this.sourceText,{parentWidget: this});
var plainText = this.wiki.renderText("text/plain",this.parserType,this.sourceText,{parentWidget: this});

This comment has been minimized.

Copy link
@pmario

pmario May 10, 2023

Contributor

This seems to be an "oversight". What's the difference between sourceType and parserType. ... Just asking to try to understand the fix.

This comment has been minimized.

Copy link
@saqimtiaz

saqimtiaz May 10, 2023

Contributor

@pmario after the refactoring, there was an inconsistency in the attribute name used here and in the refresh handling of the same widget.

This comment has been minimized.

Copy link
@pmario

pmario May 10, 2023

Contributor

OK ... I see. Thanks

parseTreeNodes = [{type: "text", text: plainText}];
break;
}
Expand Down

0 comments on commit 9f1eab1

Please sign in to comment.