From 460d5f9aa9acb16f4627a489e5ec95632d80c829 Mon Sep 17 00:00:00 2001 From: Arne Heizmann Date: Tue, 13 Jul 2004 00:01:33 +0000 Subject: [PATCH] =?utf8?q?Use=20linktrail=20instead=20of=20na=EF=BF=BDve?= =?utf8?q?=20\\S*?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- includes/Parser.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/includes/Parser.php b/includes/Parser.php index 3cbefc8f15..5412334e58 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -956,7 +956,7 @@ class Parser # Regexp for URL in square brackets $e1 = "/^([{$uc}{$sep}]+)\\](.*)\$/sD"; # Regexp for URL with link text in square brackets - $e2 = "/^([{$uc}{$sep}]+)\\s+([^\\]]+)\\](\\S*)(.*)\$/sD"; + $e2 = "/^([{$uc}{$sep}]+)\\s+([^\\]]+)\\](.*)\$/sD"; foreach ( $a as $line ) { @@ -974,8 +974,12 @@ class Parser else if ( preg_match( $e2, $line, $m ) ) { $link = "{$protocol}:{$m[1]}"; $text = $m[2]; - $dtrail = $m[3]; - $trail = $m[4]; + $dtrail = ''; + $trail = $m[3]; + if ( preg_match( wfMsg ('linktrail'), $trail, $m2 ) ) { + $dtrail = $m2[1]; + $trail = $m2[2]; + } } # CASE 3: Nothing matches, just output the source text -- 2.20.1