Fix for r85990, which broke lists inside tables; adding test for it
authorLeo Koppelkamm <diebuche@users.mediawiki.org>
Thu, 14 Apr 2011 18:45:04 +0000 (18:45 +0000)
committerLeo Koppelkamm <diebuche@users.mediawiki.org>
Thu, 14 Apr 2011 18:45:04 +0000 (18:45 +0000)
includes/parser/Parser.php
tests/parser/parserTests.txt

index f3ba2b5..6cf1e2b 100644 (file)
@@ -966,7 +966,7 @@ class Parser {
                                $output =& $currentElement['content'];
 
                        } else {
-                               $output .= "\n$outLine\n";
+                               $output .= "\n$outLine";
                        }
                }
 
index 6be8e24..af62b25 100644 (file)
@@ -1403,7 +1403,69 @@ Table with thead & tfoot
 </tr></tfoot>
 </table>
 
+!! end
+
+!! test
+Table with list inside
+!! input
+{|
+|style="width: 5em; text-align: center"| gives
+|style="border: 1px dashed #2F6FAB; padding: 0.5em; margin: 0.5em"|
+# Some
+# list
+# Lorem
+# ipsum
+# dolor
+|}
+!! result
+<table>
+<tr>
+<td style="width: 5em; text-align: center">gives
+</td>
+<td style="border: 1px dashed #2F6FAB; padding: 0.5em; margin: 0.5em">
+<ol><li> Some
+</li><li> list
+</li><li> Lorem
+</li><li> ipsum
+</li><li> dolor
+</li></ol>
+</td>
+</tr>
+</table>
+
 !! end
+!! test
+Simple paragraph
+!! input
+This is a simple paragraph.
+!! result
+<p>This is a simple paragraph.
+</p>
+!! end
+
+!! test
+Table with multiline contents
+!! input
+{|
+| Alice
+Bob
+dfdfg
+dfg
+|}
+!! result
+<table>
+<tr>
+<td>Alice
+<p>Bob
+dfdfg
+dfg
+</p>
+</td>
+</tr>
+</table>
+
+!! end
+
 !! test
 Multiplication table
 !! input
@@ -5902,9 +5964,9 @@ MOVE YOUR MOUSE CURSOR OVER THIS TEXT
 |
 !! result
 <p>{{{|
-</p><p><u class="&#124;">}}}} &gt;
-</p><p><br style="onmouseover=&#39;alert(document.cookie);&#39;" />
-</p><p>MOVE YOUR MOUSE CURSOR OVER THIS TEXT
+<u class="&#124;">}}}} &gt;
+<br style="onmouseover=&#39;alert(document.cookie);&#39;" />
+MOVE YOUR MOUSE CURSOR OVER THIS TEXT
 </p>
 <table>
 <tr>