From 515e0d9bf12199f3f728efe3cf5c380c50506016 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Mon, 26 Nov 2012 14:19:54 +0000 Subject: [PATCH] Fixed bug with table parser --- core/modules/parsers/wikitextparser/rules/table.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/modules/parsers/wikitextparser/rules/table.js b/core/modules/parsers/wikitextparser/rules/table.js index 8924d47ae..72be508f0 100644 --- a/core/modules/parsers/wikitextparser/rules/table.js +++ b/core/modules/parsers/wikitextparser/rules/table.js @@ -86,7 +86,7 @@ var processRow = function(prevColumns) { // Parse the cell cell.children = this.parseRun(cellTermRegExp); // Set the alignment for the cell - if(cellMatch[1].substr(cellMatch[1].length-2,1) === " ") { // spaceRight + if(cellMatch[1].substr(cellMatch[1].length-1,1) === " ") { // spaceRight cell.attributes.align = spaceLeft ? "center" : "left"; } else if(spaceLeft) { cell.attributes.align = "right"; @@ -151,7 +151,6 @@ exports.parse = function(match,isBlock) { rowCount++; } } - rowRegExp.lastIndex = this.pos; rowMatch = rowRegExp.exec(this.source); } return [table];