mirror of
https://github.com/diocloid/LinkTitles.git
synced 2025-07-13 09:49:31 +02:00
Fix regex for existing link detection.
- Fix: Detection of existing links had a bug.
This commit is contained in:
@ -94,7 +94,7 @@ class Linker {
|
|||||||
// A link to the current page should only be recognized if it appears in
|
// 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.
|
// clear text, i.e. we do not count piped links as existing links.
|
||||||
// (Similarly, by design, redirections should not be counted 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;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user