Fix bug 2095: three closing brackets

This commit is contained in:
Gabriel Wicke 2006-03-24 16:40:31 +00:00
parent e804f4543e
commit 8774b03482

View file

@ -1407,7 +1407,11 @@ class Parser
# Still some problems for cases where the ] is meant to be outside punctuation,
# and no image is in sight. See bug 2095.
#
if( $text !== '' && preg_match( "/^\](.*)/s", $m[3], $n ) ) {
if( $text !== '' &&
preg_match( "/^\](.*)/s", $m[3], $n ) &&
strpos($text, '[') !== false
)
{
$text .= ']'; # so that replaceExternalLinks($text) works later
$m[3] = $n[1];
}