From a169980a5456bb28fc4f71f784dca1b248343ea3 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Sat, 2 Jun 2012 09:41:03 +0100 Subject: [PATCH] Fixed two bugs --- core/modules/parsers/newwikitextparser/newwikitextparser.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/modules/parsers/newwikitextparser/newwikitextparser.js b/core/modules/parsers/newwikitextparser/newwikitextparser.js index d12ff56ae..57b5b94de 100644 --- a/core/modules/parsers/newwikitextparser/newwikitextparser.js +++ b/core/modules/parsers/newwikitextparser/newwikitextparser.js @@ -92,7 +92,7 @@ WikiTextRenderer.prototype.parseRun = function(terminatorRegExp) { if(terminatorMatch.index > this.pos) { tree.push($tw.Tree.Text(this.source.substring(this.pos,terminatorMatch.index))); } - this.pos = terminatorMatch.index; + this.pos = terminatorMatch.index + terminatorMatch[0].length; return tree; } } @@ -120,7 +120,7 @@ WikiTextRenderer.prototype.parseRun = function(terminatorRegExp) { } // Process the remaining text if(this.pos < this.sourceLength) { - tree.push($tw.tree.Text(this.source.substr(this.pos))); + tree.push($tw.Tree.Text(this.source.substr(this.pos))); } this.pos = this.sourceLength; return tree;