mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 22:35:41 +00:00
Merge "Merge MW internal link annotations if they have the same target"
This commit is contained in:
commit
5de7b8a461
|
@ -60,6 +60,15 @@ ve.dm.MWExternalLinkAnnotation.prototype.getComparableObject = function () {
|
|||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
ve.dm.MWExternalLinkAnnotation.prototype.getComparableHtmlAttributes = function () {
|
||||
// Assume that wikitext never adds meaningful html attributes for comparison purposes,
|
||||
// although ideally this should be decided by Parsoid (Bug T95028).
|
||||
return {};
|
||||
};
|
||||
|
||||
/* Registration */
|
||||
|
||||
ve.dm.modelRegistry.register( ve.dm.MWExternalLinkAnnotation );
|
||||
|
|
|
@ -148,10 +148,9 @@ ve.dm.MWInternalLinkAnnotation.prototype.getComparableObject = function () {
|
|||
* @inheritdoc
|
||||
*/
|
||||
ve.dm.MWInternalLinkAnnotation.prototype.getComparableHtmlAttributes = function () {
|
||||
var attributes = ve.dm.Annotation.prototype.getComparableHtmlAttributes.call( this );
|
||||
delete attributes.href;
|
||||
delete attributes.rel;
|
||||
return attributes;
|
||||
// Assume that wikitext never adds meaningful html attributes for comparison purposes,
|
||||
// although ideally this should be decided by Parsoid (Bug T95028).
|
||||
return {};
|
||||
};
|
||||
|
||||
/* Registration */
|
||||
|
|
Loading…
Reference in a new issue