Fixes the other r86004 test case and r86010 one.
$return .= '>';
$return .= $table[$i][$j]['content'];
$return .= '>';
$return .= $table[$i][$j]['content'];
+ if ( $table[$i][$j]['content'] != '' )
+ $return .= "\n";
$return .= '</' . $table[$i][$j]['type'] . '>';
unset( $table[$i][$j] );
$return .= '</' . $table[$i][$j]['type'] . '>';
unset( $table[$i][$j] );
+<td>1
+</td>
+<td>2
+</td>
+<td>3
+</td>
+<td>4
+</td>
-<th>×</th>
-<th>1</th>
-<th>2</th>
-<th>3</th>
+<th>×
+</th>
+<th>1
+</th>
+<th>2
+</th>
+<th>3
+</th>
</tr></thead>
<tbody>
<tr>
</tr></thead>
<tbody>
<tr>
-<th>1</th>
-<td>1</td>
-<td>2</td>
-<td>3</td>
+<th>1
+</th>
+<td>1
+</td>
+<td>2
+</td>
+<td>3
+</td>
-<th>2</th>
-<td>2</td>
-<td>4</td>
-<td>6</td>
+<th>2
+</th>
+<td>2
+</td>
+<td>4
+</td>
+<td>6
+</td>
-<th>3</th>
-<td>3</td>
-<td>6</td>
-<td>9</td>
+<th>3
+</th>
+<td>3
+</td>
+<td>6
+</td>
+<td>9
+</td>
-<th>4</th>
-<td>4</td>
-<td>8</td>
-<td>12</td>
+<th>4
+</th>
+<td>4
+</td>
+<td>8
+</td>
+<td>12
+</td>
-<th>5</th>
-<td>5</td>
-<td>10</td>
-<td>15</td>
+<th>5
+</th>
+<td>5
+</td>
+<td>10
+</td>
+<td>15
+</td>
!! result
<table align="right" border="1">
<tr>
!! result
<table align="right" border="1">
<tr>
-<td>Cell 1, row 1</td>
-<td rowspan="2">Cell 2, row 1 (and 2)</td>
-<td>Cell 3, row 1</td>
+<td>Cell 1, row 1
+</td>
+<td rowspan="2">Cell 2, row 1 (and 2)
+</td>
+<td>Cell 3, row 1
+</td>
-<td>Cell 1, row 2</td>
-<td>Cell 3, row 2</td>
+<td>Cell 1, row 2
+</td>
+<td>Cell 3, row 2
+</td>
!! result
<table border="1">
<tr>
!! result
<table border="1">
<tr>
<td>
<table bgcolor="#ABCDEF" border="2">
<tr>
<td>
<table bgcolor="#ABCDEF" border="2">
<tr>
-</table></td>
-<td>the original table again</td>
+</table>
+</td>
+<td>the original table again
+</td>
<caption><i>caption</i>
</caption>
<tr>
<caption><i>caption</i>
</caption>
<tr>
-<th><i>Cell</i></th>
-<td>Value</td>
+<th><i>Cell</i>
+</th>
+<td>Value
+</td>
-<td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
-<td>]" onmouseover="alert(document.cookie)">test</td>
+<td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a>
+</td>
+<td>]" onmouseover="alert(document.cookie)">test
+</td>
!! result
<dl><dd><table>
<tr>
!! result
<dl><dd><table>
<tr>
+<td>1
+</td>
+<td>2
+</td>
+<td>3
+</td>
+<td>4
+</td>
-<td>[[{{{1}}}|{{{2}}}]]</td>
+<td>[[{{{1}}}|{{{2}}}]]
+</td>
+<td>1
+</td>
+<td>2
+</td>
+<td>3
+</td>
+<td>4
+</td>
+<td>1
+</td>
+<td>2
+</td>
+<td>3
+</td>
+<td>4
+</td>
-<th class="awesome">status</th>
+<th class="awesome">status
+</th>
-<th style="color:blue">status</th>
+<th style="color:blue">status
+</th>
-<th style="/* insecure input */">status</th>
+<th style="/* insecure input */">status
+</th>
<h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: a">edit</a>]</span> <span class="mw-headline" id="a">a</span></h2>
<table style="__TOC__">
<tr>
<h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: a">edit</a>]</span> <span class="mw-headline" id="a">a</span></h2>
<table style="__TOC__">
<tr>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
-<th><a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"</th>
+<th><a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
+</th>
+<td>1
+</td>
+<td>2
+</td>
+<td>3
+</td>
+<td>4
+</td>