mirror of
https://github.com/diocloid/LinkTitles.git
synced 2025-07-13 01:39:30 +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( '_', ' ',
|
||||
|
@ -49,7 +49,7 @@
|
||||
'name' => 'LinkTitles',
|
||||
'author' => '[https://www.mediawiki.org/wiki/User:Bovender Daniel Kraus]',
|
||||
'url' => 'https://www.mediawiki.org/wiki/Extension:LinkTitles',
|
||||
'version' => '2.3.0',
|
||||
'version' => '2.3.1',
|
||||
'descriptionmsg' => 'linktitles-desc'
|
||||
);
|
||||
|
||||
|
3
NEWS
3
NEWS
@ -1,3 +1,6 @@
|
||||
LinkTitles 2.3.1: 2013-08-29
|
||||
* Fix bug introduced with 2.3.0 that prevented the extension from working...
|
||||
|
||||
LinkTitles 2.3.0: 2013-08-28
|
||||
* No longer mess up pages if a page title started with a slash.
|
||||
* Do not link preformatted text and text enclosed in <nowiki> or <code>
|
||||
|
Reference in New Issue
Block a user