Fix handling of target titles with numbers.

- Fix: Improve handling of page titles that start or end with numbers.
This commit is contained in:
Daniel Kraus
2018-06-27 21:31:16 +02:00
parent f2633fa78e
commit 7a69e87a8d
3 changed files with 42 additions and 4 deletions

View File

@ -81,8 +81,8 @@ class Target {
// to detect whole words containing non-ASCII characters as well.
// Note that this requires a PCRE library that was compiled with
// --enable-unicode-properties
( $config->wordStartOnly ) ? $this->wordStart = '(?<!\pL)' : $this->wordStart = '';
( $config->wordEndOnly ) ? $this->wordEnd = '(?!\pL)' : $this->wordEnd = '';
( $config->wordStartOnly ) ? $this->wordStart = '(?<!\pL|\pN)' : $this->wordStart = '';
( $config->wordEndOnly ) ? $this->wordEnd = '(?!\pL|\pN)' : $this->wordEnd = '';
}
/**