Home » Text » Text_Wiki_Mediawiki » Bug #8496
Tables parse a non-existant empty row
Details
| Submitted | 2006-08-18 03:51 UTC |
|---|---|
| From | bjs5075 at rit dot edu |
| Assigned | ritzmo |
| Status | Closed |
| Package | Text_Wiki_Mediawiki |
| PHP Version | 5.1.4 |
| OS | Debian etch |
| Roadmaps | (Not assigned) |
Comments
[2006-08-18 03:51 UTC] bjs5075 at rit dot edu
Description:
------------
Table parser row-regex recognizes a row that is empty string.
This causes an empty row to be added to end of all tables.
Test script:
---------------
{|
|test||this
|}
Expected result:
----------------
<table>
<tr>
<td>test</td><td>this</td>
</tr>
</table>
Actual result:
--------------
<table>
<tr>
<td>test</td><td>this</td>
</tr>
<tr></tr>
</table>
[2006-08-18 04:00 UTC] bjs5075 at rit dot edu
The row regex is:
'#(?:^(\||!)-|\G)(.*?)^(.*?)(?=^(?:\|-|!-|\z))#msi'
It ought to be:
'#(?:^(\||!)-|\G)(.*?)^(.+?)(?=^(?:\|-|!-|\z))#msi'
Note the required content in the line following the new-row marker "|-"
[2006-08-18 11:38 UTC] ritzmo at php dot net
Patch committed to CVS.