mirror of
https://github.com/diocloid/LinkTitles.git
synced 2025-07-13 09:49:31 +02:00
Fix regular expression.
The regular expression used to split the page content had a few pipe characters in the wrong places, due to the previous 'cleaning-up' of the convoluted expression for version 2.3.0.
This commit is contained in:
@ -107,9 +107,9 @@
|
||||
|
||||
if ( $wgLinkTitlesSkipTemplates )
|
||||
{
|
||||
$templatesDelimiter = '{{.+?}}';
|
||||
$templatesDelimiter = '{{.+?}}|';
|
||||
} else {
|
||||
$templatesDelimiter = '{{[^|]+?}}|{{.+\|';
|
||||
$templatesDelimiter = '{{[^|]+?}}|{{.+\||';
|
||||
};
|
||||
|
||||
// Build a regular expression that will capture existing wiki links ("[[...]]"),
|
||||
@ -127,8 +127,8 @@
|
||||
$templatesDelimiter . // templates (if requested)
|
||||
'^ .+?\n|\n .+?\n|\n .+?$|^ .+?$|' . // preformatted text
|
||||
'<nowiki>.*?<.nowiki>|<code>.*?<\/code>|' . // nowiki/code
|
||||
'|\[' . $urlPattern . '\s.+?\]|'. $urlPattern . '(?=\s|$)' . // urls
|
||||
'|(?<=\b)\S+\@(?:\S+\.)+\S+(?=\b)' . // email addresses
|
||||
'\[' . $urlPattern . '\s.+?\]|'. $urlPattern . '(?=\s|$)|' . // urls
|
||||
'(?<=\b)\S+\@(?:\S+\.)+\S+(?=\b)' . // email addresses
|
||||
')/i';
|
||||
|
||||
$black_list = str_replace( '_', ' ',
|
||||
|
Reference in New Issue
Block a user