mirror of
https://github.com/diocloid/LinkTitles.git
synced 2025-07-13 09:49:31 +02:00
Fix bug with non-latin languages.
- Fix: When $wgCapitalLinks was true, the extension would not work with non-latin languages. Closes #7.
This commit is contained in:
@ -139,7 +139,7 @@ class Target {
|
||||
public function getCaseSensitiveLinkValueRegex() {
|
||||
if ( $this->caseSensitiveLinkValueRegex === null ) {
|
||||
$regexSafeTitle = $this->getRegexSafeTitle();
|
||||
if ( $this->config->capitalLinks && ( $regexSafeTitle[0] != '\\' )) {
|
||||
if ( $this->config->capitalLinks && preg_match( '/[a-zA-Z]/', $regexSafeTitle[0] ) ) {
|
||||
$this->caseSensitiveLinkValueRegex = '((?i)' . $regexSafeTitle[0] . '(?-i)' . substr($regexSafeTitle, 1) . ')';
|
||||
} else {
|
||||
$this->caseSensitiveLinkValueRegex = '(' . $regexSafeTitle . ')';
|
||||
|
Reference in New Issue
Block a user