diff --git a/core/modules/widgets/macrocall.js b/core/modules/widgets/macrocall.js index adf1f908c..2381d0360 100644 --- a/core/modules/widgets/macrocall.js +++ b/core/modules/widgets/macrocall.js @@ -56,14 +56,15 @@ MacroCallWidget.prototype.execute = function() { if(this.renderOutput === "text/html") { // If so we'll return the parsed macro // Check if we've already cached parsing this macro - var parser; - if(variableInfo.srcVariable && variableInfo.srcVariable.parser) { - parser = variableInfo.srcVariable.parser; + var mode = this.parseTreeNode.isBlock ? "blockParser" : "inlineParser", + parser; + if(variableInfo.srcVariable && variableInfo.srcVariable[mode]) { + parser = variableInfo.srcVariable[mode]; } else { parser = this.wiki.parseText(this.parseType,text, {parseAsInline: !this.parseTreeNode.isBlock}); if(variableInfo.isCacheable && variableInfo.srcVariable) { - variableInfo.srcVariable.parser = parser; + variableInfo.srcVariable[mode] = parser; } } var parseTreeNodes = parser ? parser.tree : [];