From: Arne Heizmann Date: Tue, 13 Jul 2004 00:01:33 +0000 (+0000) Subject: Use linktrail instead of na�ve \\S* X-Git-Tag: 1.5.0alpha1~2687 X-Git-Url: http://git.cyclocoop.org/geomaker.php?a=commitdiff_plain;h=460d5f9aa9acb16f4627a489e5ec95632d80c829;p=lhc%2Fweb%2Fwiklou.git Use linktrail instead of na�ve \\S* --- 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