r86064 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r86063‎ | r86064 | r86065 >
Date:18:45, 14 April 2011
Author:diebuche
Status:ok (Comments)
Tags:
Comment:
Fix for r85990, which broke lists inside tables; adding test for it
Modified paths:
  • /trunk/phase3/includes/parser/Parser.php (modified) (history)
  • /trunk/phase3/tests/parser/parserTests.txt (modified) (history)

Diff [purge]

Index: trunk/phase3/tests/parser/parserTests.txt
@@ -1404,7 +1404,69 @@
14051405 </table>
14061406
14071407 !! end
 1408+
14081409 !! test
 1410+Table with list inside
 1411+!! input
 1412+{|
 1413+|style="width: 5em; text-align: center"| gives
 1414+|style="border: 1px dashed #2F6FAB; padding: 0.5em; margin: 0.5em"|
 1415+# Some
 1416+# list
 1417+# Lorem
 1418+# ipsum
 1419+# dolor
 1420+|}
 1421+!! result
 1422+<table>
 1423+<tr>
 1424+<td style="width: 5em; text-align: center">gives
 1425+</td>
 1426+<td style="border: 1px dashed #2F6FAB; padding: 0.5em; margin: 0.5em">
 1427+<ol><li> Some
 1428+</li><li> list
 1429+</li><li> Lorem
 1430+</li><li> ipsum
 1431+</li><li> dolor
 1432+</li></ol>
 1433+</td>
 1434+</tr>
 1435+</table>
 1436+
 1437+!! end
 1438+!! test
 1439+Simple paragraph
 1440+!! input
 1441+This is a simple paragraph.
 1442+!! result
 1443+<p>This is a simple paragraph.
 1444+</p>
 1445+!! end
 1446+
 1447+!! test
 1448+Table with multiline contents
 1449+!! input
 1450+{|
 1451+| Alice
 1452+Bob
 1453+dfdfg
 1454+dfg
 1455+|}
 1456+!! result
 1457+<table>
 1458+<tr>
 1459+<td>Alice
 1460+<p>Bob
 1461+dfdfg
 1462+dfg
 1463+</p>
 1464+</td>
 1465+</tr>
 1466+</table>
 1467+
 1468+!! end
 1469+
 1470+!! test
14091471 Multiplication table
14101472 !! input
14111473 {| border="1" cellpadding="2"
@@ -5902,9 +5964,9 @@
59035965 |
59045966 !! result
59055967 <p>{{{|
5906 -</p><p><u class="&#124;">}}}} &gt;
5907 -</p><p><br style="onmouseover=&#39;alert(document.cookie);&#39;" />
5908 -</p><p>MOVE YOUR MOUSE CURSOR OVER THIS TEXT
 5968+<u class="&#124;">}}}} &gt;
 5969+<br style="onmouseover=&#39;alert(document.cookie);&#39;" />
 5970+MOVE YOUR MOUSE CURSOR OVER THIS TEXT
59095971 </p>
59105972 <table>
59115973 <tr>
Index: trunk/phase3/includes/parser/Parser.php
@@ -966,7 +966,7 @@
967967 $output =& $currentElement['content'];
968968
969969 } else {
970 - $output .= "\n$outLine\n";
 970+ $output .= "\n$outLine";
971971 }
972972 }
973973

Follow-up revisions

RevisionCommit summaryAuthorDate
r86072Followup to r86064 (List with double line-breaks inside tables). Also contain...diebuche19:28, 14 April 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r85991Readd support for headings inside tables, broken in r85922 and reported on it...platonides22:20, 13 April 2011

Comments

#Comment by Trevor Parscal (WMF) (talk | contribs)   19:04, 14 April 2011

Are you sure this is a follow up to r85990? It seems unrelated, did you get the revision number wrong?

#Comment by DieBuche (talk | contribs)   19:06, 14 April 2011

Uh,sorry; I meant r85991

Status & tagging log