From: <var...@us...> - 2009-02-28 20:22:34
|
Revision: 6606 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6606&view=rev Author: vargenau Date: 2009-02-28 20:22:29 +0000 (Sat, 28 Feb 2009) Log Message: ----------- Allow pipe inside curly brackets Modified Paths: -------------- trunk/lib/plugin/MediawikiTable.php Modified: trunk/lib/plugin/MediawikiTable.php =================================================================== --- trunk/lib/plugin/MediawikiTable.php 2009-02-28 20:03:55 UTC (rev 6605) +++ trunk/lib/plugin/MediawikiTable.php 2009-02-28 20:22:29 UTC (rev 6606) @@ -197,16 +197,20 @@ // If there is a "|" in the line, the start of line // (before the "|") is made of attributes. // The end of the line (after the "|") is the cell content - // This is not true if the pipe is inside [] + // This is not true if the pipe is inside [], {{}} or {{{}}} // | [foo|bar] // The following cases must work: // | foo // | [foo|bar] // | class="xxx" | foo // | class="xxx" | [foo|bar] + // | {{tmpl|arg=val}} + // | {{image.png|alt}} + // | {{{ xxx | yyy }}} $pospipe = strpos($line, "|"); $posbracket = strpos($line, "["); - if (($pospipe !== false) && (($posbracket === false) || ($posbracket > $pospipe))) { + $poscurly = strpos($line, "{"); + if (($pospipe !== false) && (($posbracket === false) || ($posbracket > $pospipe)) && (($poscurly === false) || ($poscurly > $pospipe))) { $attrs = parse_attributes(substr($line, 0, $pospipe)); foreach ($attrs as $key => $value) { if (in_array ($key, array("id", "class", "title", "style", This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |