Page MenuHomePhabricator

Allow WikiTables in ParserFunctions without using transclusions
Closed, DeclinedPublic

Description

Normally there are 2 ways to make a table which is affected by ParserFunctions
like #if:

Using HTML Tables:

Something

Or using the template {{!}} which would contain the | character:
{|

-
Something{{#if:{{{1}}}<nowiki>/

{{!}} Something else| }}

}

But DynamicPageList2 introduced the idea of getting around the ParserFunctions'
absolute control over the | by using ¦ instead. We should be able to use this
syntax to allow WikiTables to work with ParserFunctions. Technically this is the
most readable and most efficient method of adding ParserFunctions to tables:
{|

-
Something{{#if:{{{1}}}<nowiki>/

¦ Something else| }}

}

Version: unspecified
Severity: enhancement

Details

Reference
bz9770

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 21 2014, 9:38 PM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz9770.

Patch for includes/Parser.php

This patch was made for the current 1.10a HEAD trunk, MediaWiki was updated
before the patch was applied to the file.

The patch was made through only adding extra conditions and a few restricted
replacements so there should be no room for glitches such as ¦'s in the page
content being rendered as |'s. Also, only one explode was replaced with a
preg_split so there shouldn't be any sort of higher server load.

Attached:

robchur wrote:

This adds another horrible hack to workaround shortcomings of the parser, and furthermore complicates table markup which a lot of users object to.