Merge "Merge MW internal link annotations if they have the same target"

This commit is contained in:
jenkins-bot 2015-04-06 19:32:05 +00:00 committed by Gerrit Code Review
commit 5de7b8a461
2 changed files with 12 additions and 4 deletions

View file

@ -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 );

View file

@ -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 */