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 "Move section ID fallbacks into headers themselves"
[lhc/web/wiklou.git]
/
includes
/
Linker.php
diff --git
a/includes/Linker.php
b/includes/Linker.php
index
d55f0e0
..
aedb704
100644
(file)
--- a/
includes/Linker.php
+++ b/
includes/Linker.php
@@
-1624,14
+1624,16
@@
class Linker {
$link, $fallbackAnchor = false
) {
$anchorEscaped = htmlspecialchars( $anchor );
$link, $fallbackAnchor = false
) {
$anchorEscaped = htmlspecialchars( $anchor );
- $ret = "<h$level$attribs"
- . "<span class=\"mw-headline\" id=\"$anchorEscaped\">$html</span>"
- . $link
- . "</h$level>";
+ $fallback = '';
if ( $fallbackAnchor !== false && $fallbackAnchor !== $anchor ) {
$fallbackAnchor = htmlspecialchars( $fallbackAnchor );
if ( $fallbackAnchor !== false && $fallbackAnchor !== $anchor ) {
$fallbackAnchor = htmlspecialchars( $fallbackAnchor );
- $
ret = "<div id=\"$fallbackAnchor\"></div>$ret
";
+ $
fallback = "<span id=\"$fallbackAnchor\"></span>
";
}
}
+ $ret = "<h$level$attribs"
+ . "$fallback<span class=\"mw-headline\" id=\"$anchorEscaped\">$html</span>"
+ . $link
+ . "</h$level>";
+
return $ret;
}
return $ret;
}