mirror of
https://github.com/diocloid/LinkTitles.git
synced 2025-07-13 01:39:30 +02:00
Use S flag in regular expressions.
This commit is contained in:
@ -180,7 +180,7 @@
|
|||||||
for ( $i = 0; $i < count( $arr ); $i+=2 ) {
|
for ( $i = 0; $i < count( $arr ); $i+=2 ) {
|
||||||
// even indexes will point to text that is not enclosed by brackets
|
// even indexes will point to text that is not enclosed by brackets
|
||||||
$arr[$i] = preg_replace_callback( '/(?<![\:\.\@\/\?\&])' .
|
$arr[$i] = preg_replace_callback( '/(?<![\:\.\@\/\?\&])' .
|
||||||
self::$wordStartDelim . $searchTerm . self::$wordEndDelim . '/u',
|
self::$wordStartDelim . $searchTerm . self::$wordEndDelim . '/Su',
|
||||||
array('LinkTitles', 'simpleModeCallback'), $arr[$i], $limit, $count );
|
array('LinkTitles', 'simpleModeCallback'), $arr[$i], $limit, $count );
|
||||||
if (( $limit >= 0 ) && ( $count > 0 )) {
|
if (( $limit >= 0 ) && ( $count > 0 )) {
|
||||||
break;
|
break;
|
||||||
@ -198,7 +198,7 @@
|
|||||||
// even indexes will point to text that is not enclosed by brackets
|
// even indexes will point to text that is not enclosed by brackets
|
||||||
$arr[$i] = preg_replace_callback( '/(?<![\:\.\@\/\?\&])' .
|
$arr[$i] = preg_replace_callback( '/(?<![\:\.\@\/\?\&])' .
|
||||||
self::$wordStartDelim . '(' . $quotedTitle . ')' .
|
self::$wordStartDelim . '(' . $quotedTitle . ')' .
|
||||||
self::$wordEndDelim . '/iu', array('LinkTitles', 'smartModeCallback'),
|
self::$wordEndDelim . '/iuS', array('LinkTitles', 'smartModeCallback'),
|
||||||
$arr[$i], $limit, $count );
|
$arr[$i], $limit, $count );
|
||||||
if (( $limit >= 0 ) && ( $count > 0 )) {
|
if (( $limit >= 0 ) && ( $count > 0 )) {
|
||||||
break;
|
break;
|
||||||
@ -413,7 +413,7 @@
|
|||||||
'style=".+?"|class=".+?"|' . // styles and classes (e.g. of wikitables)
|
'style=".+?"|class=".+?"|' . // styles and classes (e.g. of wikitables)
|
||||||
'\[' . $urlPattern . '\s.+?\]|'. $urlPattern . '(?=\s|$)|' . // urls
|
'\[' . $urlPattern . '\s.+?\]|'. $urlPattern . '(?=\s|$)|' . // urls
|
||||||
'(?<=\b)\S+\@(?:\S+\.)+\S+(?=\b)' . // email addresses
|
'(?<=\b)\S+\@(?:\S+\.)+\S+(?=\b)' . // email addresses
|
||||||
')/ism';
|
')/ismS';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user