Amire80 has uploaded a new change for review.
https://gerrit.wikimedia.org/r/162119
Change subject: When adapting an image, make the values of href and resource
the same
......................................................................
When adapting an image, make the values of href and resource the same
When the resource attribute of the <img> tag is different from
the href attribute of the <a> tag around the image, Parsoid inserts
an unnecessary link attribute to the wiki syntax of the image.
The <img> is not immediately enclosed in the <a> tag, so .parents()
must be used instead of .parent().
Bug: 70052
Change-Id: I9eebc665c9beef38998520858c58caba98c13539
---
M modules/tools/ext.cx.tools.images.js
1 file changed, 1 insertion(+), 1 deletion(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation
refs/changes/19/162119/1
diff --git a/modules/tools/ext.cx.tools.images.js
b/modules/tools/ext.cx.tools.images.js
index fcd6e58..5dd879d 100644
--- a/modules/tools/ext.cx.tools.images.js
+++ b/modules/tools/ext.cx.tools.images.js
@@ -79,7 +79,7 @@
'$1' +
translatedNamespace + '$3' );
$image.attr( 'resource',
resource );
// If the image has a parent
link, correct its link target
- $image.parent( 'a' ).attr(
'href', resource );
+ $image.parents( 'a' ).attr(
'href', resource );
}
} );
} );
--
To view, visit https://gerrit.wikimedia.org/r/162119
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I9eebc665c9beef38998520858c58caba98c13539
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Amire80 <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits