mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-09-25 11:16:51 +00:00
MWInternalLinkAnnotation: handle non-internal links that say they're mw:WikiLink
The likely case for this is: copying from within VE in one wiki, and pasting into VE in another wiki. This change will notice this happening, and fall back to treat it as an external link. (For the wiki-internal links, this will turn them into interwiki links rather than raw external links.) Bug: T223322 Change-Id: Ie0157fc3aee6e5fd9973a2889be7ebd287bc90a5
This commit is contained in:
parent
3285b7dbe5
commit
c66f8e0547
|
@ -45,6 +45,10 @@ ve.dm.MWInternalLinkAnnotation.static.toDataElement = function ( domElements, co
|
|||
);
|
||||
}
|
||||
|
||||
if ( !targetData.isInternal ) {
|
||||
return ve.dm.MWExternalLinkAnnotation.static.toDataElement( domElements, converter );
|
||||
}
|
||||
|
||||
return {
|
||||
type: this.name,
|
||||
attributes: {
|
||||
|
|
Loading…
Reference in a new issue