Fix regex for existing link detection.

- Fix: Detection of existing links had a bug.
This commit is contained in:
Daniel Kraus
2017-09-03 09:33:38 +02:00
parent b877821bce
commit b879fd409d

View File

@ -94,7 +94,7 @@ class Linker {
// A link to the current page should only be recognized if it appears in
// clear text, i.e. we do not count piped links as existing links.
// (Similarly, by design, redirections should not be counted as existing links.)
if ( $limit == 1 && preg_match( '/[[' . $target->getCaseSensitiveLinkValueRegex() . ']]/' , $source->getText() ) ) {
if ( $limit == 1 && preg_match( '/\[\[' . $target->getCaseSensitiveLinkValueRegex() . ']]/' , $source->getText() ) ) {
continue;
}