PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Text » Text_Wiki_Mediawiki » Bug #8496

Tables parse a non-existant empty row

Details

Submitted2006-08-18 03:51 UTC
Frombjs5075 at rit dot edu
Assignedritzmo
StatusClosed
PackageText_Wiki_Mediawiki
PHP Version5.1.4
OSDebian 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.