From c1ec1578ec77e05c1bc1c155f9a69f982ef963d9 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Wed, 26 Dec 2012 19:32:54 +0000 Subject: [PATCH] Make sure the parser rules have unique names --- .../parsers/wikiparser/rules/filteredtranscludeblock.js | 4 ++-- .../parsers/wikiparser/rules/filteredtranscludeinline.js | 4 ++-- core/modules/parsers/wikiparser/rules/macrocallblock.js | 2 +- core/modules/parsers/wikiparser/rules/macrocallinline.js | 2 +- core/modules/parsers/wikiparser/rules/transcludeblock.js | 6 +++--- core/modules/parsers/wikiparser/rules/transcludeinline.js | 6 +++--- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/core/modules/parsers/wikiparser/rules/filteredtranscludeblock.js b/core/modules/parsers/wikiparser/rules/filteredtranscludeblock.js index 69e69ce74..0c26cfeb1 100644 --- a/core/modules/parsers/wikiparser/rules/filteredtranscludeblock.js +++ b/core/modules/parsers/wikiparser/rules/filteredtranscludeblock.js @@ -20,7 +20,7 @@ Wiki text rule for block-level filtered transclusion. For example: /*global $tw: false */ "use strict"; -exports.name = "filteredtransclude"; +exports.name = "filteredtranscludeblock"; exports.types = {block: true}; exports.init = function(parser) { @@ -35,7 +35,7 @@ exports.parse = function() { // Get the match details var filter = this.match[1], tooltip = this.match[2], - template = this.match[3], + template = $tw.utils.trim(this.match[3]), style = this.match[4], classes = this.match[5]; // Return the list widget diff --git a/core/modules/parsers/wikiparser/rules/filteredtranscludeinline.js b/core/modules/parsers/wikiparser/rules/filteredtranscludeinline.js index 31f53a577..101d9d8d7 100644 --- a/core/modules/parsers/wikiparser/rules/filteredtranscludeinline.js +++ b/core/modules/parsers/wikiparser/rules/filteredtranscludeinline.js @@ -20,7 +20,7 @@ Wiki text rule for inline filtered transclusion. For example: /*global $tw: false */ "use strict"; -exports.name = "filteredtransclude"; +exports.name = "filteredtranscludeinline"; exports.types = {inline: true}; exports.init = function(parser) { @@ -35,7 +35,7 @@ exports.parse = function() { // Get the match details var filter = this.match[1], tooltip = this.match[2], - template = this.match[3], + template = $tw.utils.trim(this.match[3]), style = this.match[4], classes = this.match[5]; // Return the list widget diff --git a/core/modules/parsers/wikiparser/rules/macrocallblock.js b/core/modules/parsers/wikiparser/rules/macrocallblock.js index be9566dd5..3287fe589 100644 --- a/core/modules/parsers/wikiparser/rules/macrocallblock.js +++ b/core/modules/parsers/wikiparser/rules/macrocallblock.js @@ -16,7 +16,7 @@ Wiki rule for block macro calls /*global $tw: false */ "use strict"; -exports.name = "macrocall"; +exports.name = "macrocallblock"; exports.types = {block: true}; exports.init = function(parser) { diff --git a/core/modules/parsers/wikiparser/rules/macrocallinline.js b/core/modules/parsers/wikiparser/rules/macrocallinline.js index 66e0a9c6c..54b953339 100644 --- a/core/modules/parsers/wikiparser/rules/macrocallinline.js +++ b/core/modules/parsers/wikiparser/rules/macrocallinline.js @@ -16,7 +16,7 @@ Wiki rule for macro calls /*global $tw: false */ "use strict"; -exports.name = "macrocall"; +exports.name = "macrocallinline"; exports.types = {inline: true}; exports.init = function(parser) { diff --git a/core/modules/parsers/wikiparser/rules/transcludeblock.js b/core/modules/parsers/wikiparser/rules/transcludeblock.js index 7a92e7f9a..8e4bf5575 100644 --- a/core/modules/parsers/wikiparser/rules/transcludeblock.js +++ b/core/modules/parsers/wikiparser/rules/transcludeblock.js @@ -20,7 +20,7 @@ Wiki text rule for block-level transclusion. For example: /*global $tw: false */ "use strict"; -exports.name = "transclude"; +exports.name = "transcludeblock"; exports.types = {block: true}; exports.init = function(parser) { @@ -33,9 +33,9 @@ exports.parse = function() { // Move past the match this.parser.pos = this.matchRegExp.lastIndex; // Get the match details - var targetTitle = this.match[1], + var targetTitle = $tw.utils.trim(this.match[1]), tooltip = this.match[2], - template = this.match[3], + template = $tw.utils.trim(this.match[3]), style = this.match[4], classes = this.match[5]; // Return the transclude widget diff --git a/core/modules/parsers/wikiparser/rules/transcludeinline.js b/core/modules/parsers/wikiparser/rules/transcludeinline.js index 0882a9472..e3a089725 100644 --- a/core/modules/parsers/wikiparser/rules/transcludeinline.js +++ b/core/modules/parsers/wikiparser/rules/transcludeinline.js @@ -20,7 +20,7 @@ Wiki text rule for inline-level transclusion. For example: /*global $tw: false */ "use strict"; -exports.name = "transclude"; +exports.name = "transcludeinline"; exports.types = {inline: true}; exports.init = function(parser) { @@ -33,9 +33,9 @@ exports.parse = function() { // Move past the match this.parser.pos = this.matchRegExp.lastIndex; // Get the match details - var targetTitle = this.match[1], + var targetTitle = $tw.utils.trim(this.match[1]), tooltip = this.match[2], - template = this.match[3], + template = $tw.utils.trim(this.match[3]), style = this.match[4], classes = this.match[5]; // Return the transclude widget