From: Arlo Breault Date: Wed, 16 May 2018 15:29:10 +0000 (-0400) Subject: parser: Don't unnecessarily add and remove a pipe X-Git-Tag: 1.34.0-rc.0~5418^2 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmes_infos.php?a=commitdiff_plain;h=5970ecec86121a95bb19bcc27ffb934ba7e9cb1f;p=lhc%2Fweb%2Fwiklou.git parser: Don't unnecessarily add and remove a pipe Change-Id: I884ab88f9e8ac6f402cd4b3a54e33ccbd30637a2 --- diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index b66031cc88..ac20b6af63 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -5087,17 +5087,15 @@ class Parser { } else { // Guess not, consider it as caption. wfDebug( "$parameterMatch failed parameter validation\n" ); - $label = '|' . $parameterMatch; + $label = $parameterMatch; } } } else { // Last pipe wins. - $label = '|' . $parameterMatch; + $label = $parameterMatch; } } - // Remove the pipe. - $label = substr( $label, 1 ); } $ig->add( $title, $label, $alt, $link, $handlerOptions );