mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-11-27 16:30:12 +00:00
Fix porting bug from 005176a
Bug: T249742 Change-Id: Iabe86266c06b2cbc3c51b16b73d360a7182878f1
This commit is contained in:
parent
4c7108f553
commit
b88f9ca881
|
@ -118,8 +118,8 @@ class Ref extends ExtensionTagHandler {
|
|||
if ( !$bodyElt ) {
|
||||
$extraDebug = '';
|
||||
$firstA = DOMCompat::querySelector( $node, 'a[href]' );
|
||||
$href = $firstA->getAttribute( 'href' );
|
||||
if ( $firstA && preg_match( '/^#/', $href ) ) {
|
||||
if ( $firstA && preg_match( '/^#/', $firstA->getAttribute( 'href' ) ) ) {
|
||||
$href = $firstA->getAttribute( 'href' );
|
||||
try {
|
||||
$ref = DOMCompat::querySelector( $extApi->getTopLevelDoc(), $href );
|
||||
if ( $ref ) {
|
||||
|
@ -129,7 +129,6 @@ class Ref extends ExtensionTagHandler {
|
|||
// We are just providing VE with debugging info.
|
||||
// So, ignore all exceptions / errors in this code.
|
||||
}
|
||||
|
||||
if ( !$extraDebug ) {
|
||||
$extraDebug = ' [reference ' . $href . ' not found]';
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue