Merge pull request #76 from neayi/main

Fixed an issue that would make LinkTitles cut words in the middle if they had accentuated characters
This commit is contained in:
Daniel Kraus
2024-11-22 10:21:39 +01:00
committed by GitHub

View File

@ -159,7 +159,7 @@ class Target {
* @return String regular expression pattern * @return String regular expression pattern
*/ */
private function buildRegex( $searchTerm ) { private function buildRegex( $searchTerm ) {
return '/(?<![\:\.\@\/\?\&])' . $this->wordStart . $searchTerm . $this->wordEnd . '/S'; return '/(?<![\:\.\@\/\?\&])' . $this->wordStart . $searchTerm . $this->wordEnd . '/Su';
} }
/** /**