Index: trunk/phase3/tests/parser/parserTests.txt |
— | — | @@ -1422,7 +1422,27 @@ |
1423 | 1423 | |
1424 | 1424 | !! end |
1425 | 1425 | |
| 1426 | +!! test |
| 1427 | +Indented Tables, bug 20078 |
| 1428 | +!! input |
| 1429 | +: {| |
| 1430 | +| 1 || 2 |
| 1431 | +|- |
| 1432 | +| 3 || 4 |
| 1433 | +|} |
| 1434 | +!! result |
| 1435 | +<dl><dd><table> |
| 1436 | +<tr> |
| 1437 | +<td>1</td> |
| 1438 | +<td>2</td> |
| 1439 | +</tr> |
| 1440 | +<tr> |
| 1441 | +<td>3</td> |
| 1442 | +<td>4</td> |
| 1443 | +</tr> |
| 1444 | +</table></dd></dl> |
1426 | 1445 | |
| 1446 | +!! end |
1427 | 1447 | ### |
1428 | 1448 | ### Internal links |
1429 | 1449 | ### |
Index: trunk/phase3/includes/parser/Parser.php |
— | — | @@ -839,7 +839,7 @@ |
840 | 840 | } |
841 | 841 | $matches = array(); |
842 | 842 | |
843 | | - if ( preg_match( '/^(:*)\{\|(.*)$/', $line , $matches ) ) { |
| 843 | + if ( preg_match( '/^(:*)\s*\{\|(.*)$/', $line , $matches ) ) { |
844 | 844 | $tables[] = array(); |
845 | 845 | $table =& $this->last( $tables ); |
846 | 846 | $table[0] = array(); // first row |