dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Remove FileRepoStatus references"
[lhc/web/wiklou.git]
/
includes
/
Linker.php
diff --git
a/includes/Linker.php
b/includes/Linker.php
index
8682991
..
d3d1f38
100644
(file)
--- a/
includes/Linker.php
+++ b/
includes/Linker.php
@@
-319,7
+319,7
@@
class Linker {
* @return LinkTarget
*/
public static function normaliseSpecialPage( LinkTarget $target ) {
* @return LinkTarget
*/
public static function normaliseSpecialPage( LinkTarget $target ) {
- if ( $target->getNamespace() == NS_SPECIAL ) {
+ if ( $target->getNamespace() == NS_SPECIAL
&& !$target->isExternal()
) {
list( $name, $subpage ) = SpecialPageFactory::resolveAlias( $target->getDBkey() );
if ( !$name ) {
return $target;
list( $name, $subpage ) = SpecialPageFactory::resolveAlias( $target->getDBkey() );
if ( !$name ) {
return $target;
@@
-1311,10
+1311,10
@@
class Linker {
:? # ignore optional leading colon
([^\]|]+) # 1. link target; page names cannot include ] or |
(?:\|
:? # ignore optional leading colon
([^\]|]+) # 1. link target; page names cannot include ] or |
(?:\|
- # 2.
a pipe-separated substring; only the last is captured
- # Stop matching at
| and
]] without relying on backtracking.
- ((?:]?[^\]
|
])*+)
- )
*
+ # 2.
link text
+ # Stop matching at ]] without relying on backtracking.
+ ((?:]?[^\]])*+)
+ )
?
\]\]
([^[]*) # 3. link trail (the text up until the next link)
/x',
\]\]
([^[]*) # 3. link trail (the text up until the next link)
/x',