From: Leo Koppelkamm Date: Wed, 13 Apr 2011 20:01:23 +0000 (+0000) Subject: Tables: Fix Bug 20078, add test for it X-Git-Tag: 1.31.0-rc.0~30870 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/%7B%7B%20url_for%28%27vote%27%2C%20idvote=vote.voteid%29%20%7D%7D?a=commitdiff_plain;h=b186286631caf5199dc9715c8460073d3bb67467;p=lhc%2Fweb%2Fwiklou.git Tables: Fix Bug 20078, add test for it --- diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index 5fc297457a..3eafec25d5 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -839,7 +839,7 @@ class Parser { } $matches = array(); - if ( preg_match( '/^(:*)\{\|(.*)$/', $line , $matches ) ) { + if ( preg_match( '/^(:*)\s*\{\|(.*)$/', $line , $matches ) ) { $tables[] = array(); $table =& $this->last( $tables ); $table[0] = array(); // first row diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt index e9f36bb01d..4114ea5008 100644 --- a/tests/parser/parserTests.txt +++ b/tests/parser/parserTests.txt @@ -1422,7 +1422,27 @@ Table security: embedded pipes (http://lists.wikimedia.org/mailman/htdig/wikitec !! end +!! test +Indented Tables, bug 20078 +!! input +: {| +| 1 || 2 +|- +| 3 || 4 +|} +!! result +
+ + + + + + + + +
12
34
+!! end ### ### Internal links ###