Fix bug 2095: three closing brackets
This commit is contained in:
parent
e804f4543e
commit
8774b03482
1 changed files with 5 additions and 1 deletions
|
|
@ -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];
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue