From 5970ecec86121a95bb19bcc27ffb934ba7e9cb1f Mon Sep 17 00:00:00 2001 From: Arlo Breault Date: Wed, 16 May 2018 11:29:10 -0400 Subject: [PATCH] parser: Don't unnecessarily add and remove a pipe Change-Id: I884ab88f9e8ac6f402cd4b3a54e33ccbd30637a2 --- includes/parser/Parser.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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 ); -- 2.20.1