From baf7b8d7821d28d379649f256eaabb8ce3dc59ce Mon Sep 17 00:00:00 2001 From: Cameron Fischer Date: Wed, 7 Jan 2026 15:34:40 -0500 Subject: [PATCH] Removing patch fix for recursion errors --- .../wikiparser/rules/transcludeblock.js | 21 ------------------- .../wikiparser/rules/transcludeinline.js | 21 ------------------- 2 files changed, 42 deletions(-) diff --git a/core/modules/parsers/wikiparser/rules/transcludeblock.js b/core/modules/parsers/wikiparser/rules/transcludeblock.js index 5c5367cb4..525113d5d 100644 --- a/core/modules/parsers/wikiparser/rules/transcludeblock.js +++ b/core/modules/parsers/wikiparser/rules/transcludeblock.js @@ -23,27 +23,6 @@ exports.init = function(parser) { this.matchRegExp = /\{\{([^\{\}\|]*)(?:\|\|([^\|\{\}]+))?(?:\|([^\{\}]+))?\}\}(?:\r?\n|$)/mg; }; -/* -Reject the match if we don't have a template or text reference -*/ -exports.findNextMatch = function(startPos) { - this.matchRegExp.lastIndex = startPos; - this.match = this.matchRegExp.exec(this.parser.source); - if(this.match) { - var template = $tw.utils.trim(this.match[2]), - textRef = $tw.utils.trim(this.match[1]); - // Bail if we don't have a template or text reference - if(!template && !textRef) { - return undefined; - } else { - return this.match.index; - } - } else { - return undefined; - } - return this.match ? this.match.index : undefined; -}; - exports.parse = function() { // Move past the match this.parser.pos = this.matchRegExp.lastIndex; diff --git a/core/modules/parsers/wikiparser/rules/transcludeinline.js b/core/modules/parsers/wikiparser/rules/transcludeinline.js index 57def3e33..4ae58e617 100644 --- a/core/modules/parsers/wikiparser/rules/transcludeinline.js +++ b/core/modules/parsers/wikiparser/rules/transcludeinline.js @@ -23,27 +23,6 @@ exports.init = function(parser) { this.matchRegExp = /\{\{([^\{\}\|]*)(?:\|\|([^\|\{\}]+))?(?:\|([^\{\}]+))?\}\}/mg; }; -/* -Reject the match if we don't have a template or text reference -*/ -exports.findNextMatch = function(startPos) { - this.matchRegExp.lastIndex = startPos; - this.match = this.matchRegExp.exec(this.parser.source); - if(this.match) { - var template = $tw.utils.trim(this.match[2]), - textRef = $tw.utils.trim(this.match[1]); - // Bail if we don't have a template or text reference - if(!template && !textRef) { - return undefined; - } else { - return this.match.index; - } - } else { - return undefined; - } - return this.match ? this.match.index : undefined; -}; - exports.parse = function() { // Move past the match this.parser.pos = this.matchRegExp.lastIndex;