Last modified: 2011-04-13 20:01:46 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T22078, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 20078 - indented table syntax
indented table syntax
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
unspecified
All All
: Normal enhancement with 1 vote (vote)
: ---
Assigned To: Tim Starling
: patch
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-08-05 20:21 UTC by DaBler
Modified: 2011-04-13 20:01 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
allow spaces between :* and {| (507 bytes, patch)
2010-12-18 13:50 UTC, Umherirrender
Details

Description DaBler 2009-08-05 20:21:15 UTC
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.
Comment 1 Umherirrender 2010-12-18 13:50:02 UTC
Created attachment 7919 [details]
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.
Comment 2 DieBuche 2011-04-13 20:01:46 UTC
Fixed in r85988

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links