jenkins-bot has submitted this change and it was merged.

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(-)

Approvals:
  Santhosh: Looks good to me, approved
  jenkins-bot: Verified



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: merged
Gerrit-Change-Id: I9eebc665c9beef38998520858c58caba98c13539
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Amire80 <[email protected]>
Gerrit-Reviewer: Amire80 <[email protected]>
Gerrit-Reviewer: Arlolra <[email protected]>
Gerrit-Reviewer: Santhosh <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to