From: Platonides
Date: Wed, 13 Apr 2011 23:50:33 +0000 (+0000)
Subject: Move and to its own line (unless it's an empty cell)
X-Git-Tag: 1.31.0-rc.0~30859
X-Git-Url: http://git.cyclocoop.org/data/Fool?a=commitdiff_plain;h=0677784244faee633b5660def96c7e86447e971a;p=lhc%2Fweb%2Fwiklou.git
Move and to its own line (unless it's an empty cell)
Fixes the other r86004 test case and r86010 one.
---
diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php
index d6fac6892b..a3043ebe25 100644
--- a/includes/parser/Parser.php
+++ b/includes/parser/Parser.php
@@ -1067,6 +1067,8 @@ class Parser {
$return .= '>';
$return .= $table[$i][$j]['content'];
+ if ( $table[$i][$j]['content'] != '' )
+ $return .= "\n";
$return .= '' . $table[$i][$j]['type'] . '>';
unset( $table[$i][$j] );
diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt
index 706d33b1f3..9823ef0f0f 100644
--- a/tests/parser/parserTests.txt
+++ b/tests/parser/parserTests.txt
@@ -1255,12 +1255,16 @@ Simple table
!! result
-1 |
-2 |
+1
+ |
+2
+ |
-3 |
-4 |
+3
+ |
+4
+ |
@@ -1295,41 +1299,65 @@ Multiplication table
-× |
-1 |
-2 |
-3 |
+×
+ |
+1
+ |
+2
+ |
+3
+ |
-1 |
-1 |
-2 |
-3 |
+1
+ |
+1
+ |
+2
+ |
+3
+ |
-2 |
-2 |
-4 |
-6 |
+2
+ |
+2
+ |
+4
+ |
+6
+ |
-3 |
-3 |
-6 |
-9 |
+3
+ |
+3
+ |
+6
+ |
+9
+ |
-4 |
-4 |
-8 |
-12 |
+4
+ |
+4
+ |
+8
+ |
+12
+ |
-5 |
-5 |
-10 |
-15 |
+5
+ |
+5
+ |
+10
+ |
+15
+ |
@@ -1349,13 +1377,18 @@ Table rowspan
!! result
-Cell 1, row 1 |
-Cell 2, row 1 (and 2) |
-Cell 3, row 1 |
+Cell 1, row 1
+ |
+Cell 2, row 1 (and 2)
+ |
+Cell 3, row 1
+ |
-Cell 1, row 2 |
-Cell 3, row 2 |
+Cell 1, row 2
+ |
+Cell 3, row 2
+ |
@@ -1377,17 +1410,22 @@ Nested table
!! result
-α |
+α
+ |
-nested |
+nested
+ |
-table |
+table
+ |
- |
-the original table again |
+
+
+the original table again
+ |
@@ -1402,7 +1440,8 @@ Invalid attributes in table cell (bug 1830)
!! result
@@ -1439,7 +1478,8 @@ A table with a caption with unclosed italic
caption
-Cell |
+Cell
+ |
@@ -1454,7 +1494,8 @@ A table with unclosed italic in a cell
!! result
@@ -1471,8 +1512,10 @@ A table with unclosed italic in a th
!! result
-Cell |
-Value |
+Cell
+ |
+Value
+ |
@@ -1486,8 +1529,10 @@ Table security: embedded pipes (http://lists.wikimedia.org/mailman/htdig/wikitec
!! result
-[ftp://%7Cx |
-]" onmouseover="alert(document.cookie)">test |
+[ftp://%7Cx
+ |
+]" onmouseover="alert(document.cookie)">test
+ |
@@ -1504,12 +1549,16 @@ Indented Tables, bug 20078
!! result
-1 |
-2 |
+1
+ |
+2
+ |
-3 |
-4 |
+3
+ |
+4
+ |
@@ -2773,7 +2822,8 @@ BUG 553: link with two variables in a piped link
!! result
-[[{{{1}}}|{{{2}}}]] |
+[[{{{1}}}|{{{2}}}]]
+ |
@@ -2884,12 +2934,16 @@ foo {{table}}
-1 |
-2 |
+1
+ |
+2
+ |
-3 |
-4 |
+3
+ |
+4
+ |
@@ -2905,12 +2959,16 @@ foo
-1 |
-2 |
+1
+ |
+2
+ |
-3 |
-4 |
+3
+ |
+4
+ |
@@ -4461,7 +4519,8 @@ Table multiple attributes correction
!! result
@@ -4907,7 +4966,8 @@ Table attribute legitimate extension
!! result
@@ -4922,7 +4982,8 @@ Table attribute safety
!! result
@@ -5577,7 +5638,8 @@ Fuzz testing: Parser14-table
@@ -5594,7 +5656,8 @@ noxml
!! result
-https:// |
+https://
+ |
|
|
|
@@ -5612,7 +5675,8 @@ Fuzz testing: Parser21
!! result
@@ -5672,7 +5736,8 @@ MOVE YOUR MOUSE CURSOR OVER THIS TEXT
@@ -7843,12 +7908,16 @@ y
-1 |
-2 |
+1
+ |
+2
+ |
-3 |
-4 |
+3
+ |
+4
+ |
y