From d3fefa8b16ebe45d3c73934c4bd13736d2363599 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Mon, 21 Jan 2013 17:24:47 +0000 Subject: [PATCH] Fixed regexp for filtered transclusion Previously we couldn't use filter expressions that included curly braces --- .../modules/parsers/wikiparser/rules/filteredtranscludeblock.js | 2 +- .../parsers/wikiparser/rules/filteredtranscludeinline.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/modules/parsers/wikiparser/rules/filteredtranscludeblock.js b/core/modules/parsers/wikiparser/rules/filteredtranscludeblock.js index 51ed7ba58..105027dbf 100644 --- a/core/modules/parsers/wikiparser/rules/filteredtranscludeblock.js +++ b/core/modules/parsers/wikiparser/rules/filteredtranscludeblock.js @@ -26,7 +26,7 @@ exports.types = {block: true}; exports.init = function(parser) { this.parser = parser; // Regexp to match - this.matchRegExp = /\{\{\{([^\{\}\|]+)(?:\|([^\|\{\}]+))?(?:\|\|([^\|\{\}]+))?\}\}([^\}]*)\}(?:\.(\S+))?(?:\r?\n|$)/mg; + this.matchRegExp = /\{\{\{([^\|]+)(?:\|([^\|\{\}]+))?(?:\|\|([^\|\{\}]+))?\}\}([^\}]*)\}(?:\.(\S+))?(?:\r?\n|$)/mg; }; exports.parse = function() { diff --git a/core/modules/parsers/wikiparser/rules/filteredtranscludeinline.js b/core/modules/parsers/wikiparser/rules/filteredtranscludeinline.js index 0c9b5c137..2643862c5 100644 --- a/core/modules/parsers/wikiparser/rules/filteredtranscludeinline.js +++ b/core/modules/parsers/wikiparser/rules/filteredtranscludeinline.js @@ -26,7 +26,7 @@ exports.types = {inline: true}; exports.init = function(parser) { this.parser = parser; // Regexp to match - this.matchRegExp = /\{\{\{([^\{\}\|]+)(?:\|([^\|\{\}]+))?(?:\|\|([^\|\{\}]+))?\}\}([^\}]*)\}(?:\.(\S+))?/mg; + this.matchRegExp = /\{\{\{([^\|]+)(?:\|([^\|\{\}]+))?(?:\|\|([^\|\{\}]+))?\}\}([^\}]*)\}(?:\.(\S+))?/mg; }; exports.parse = function() {