Page MenuHomePhabricator

indented table syntax
Closed, ResolvedPublic

Description

Author: DaBler

Description:
Problem:
Parser is unable to render indented tables which are separated by spaces from heading colons (:).

Example:
:{| ... this cause correct table rendering
: {| ... this cause a bug

Solution:
in method doTableStuff() (phase3/includes/parser/Parser.php) replace regexp. on line like
if ( preg_match( '/^(:*)\{\|(.*)$/', $line , $matches ) ) {
with
if ( preg_match( '/^(:*) *\{\|(.*)$/', $line , $matches ) ) {

thanks.


Version: unspecified
Severity: enhancement

Details

Reference
bz20078

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:51 PM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz20078.

Created attachment 7919
allow spaces between :* and {|

(In reply to comment #0)

Solution:
in method doTableStuff() (phase3/includes/parser/Parser.php) replace regexp. on
line like
if ( preg_match( '/^(:*)\{\|(.*)$/', $line , $matches ) ) {
with
if ( preg_match( '/^(:*) *\{\|(.*)$/', $line , $matches ) ) {
thanks.

You are right.

The attached patch add the space character for the regex.

Attached: