Unregister core image types

Once MW images are registered, we should remove core image support so
we don't accidentally match to them (e.g. an MW inline image with an
unsupported extra RDFa type).

Change-Id: I1c8567346c371fe338f95b232c9ac53e009c5a46
This commit is contained in:
Ed Sanders 2015-05-16 18:02:33 +01:00
parent b7f92605b2
commit 425e581613
4 changed files with 7 additions and 2 deletions

View file

@ -251,4 +251,5 @@ ve.dm.MWBlockImageNode.prototype.getCaptionNode = function () {
/* Registration */
ve.dm.modelRegistry.unregister( ve.dm.BlockImageNode );
ve.dm.modelRegistry.register( ve.dm.MWBlockImageNode );

View file

@ -211,4 +211,5 @@ ve.dm.MWInlineImageNode.static.toDomElements = function ( data, doc ) {
/* Registration */
ve.dm.modelRegistry.unregister( ve.dm.InlineImageNode );
ve.dm.modelRegistry.register( ve.dm.MWInlineImageNode );

View file

@ -240,7 +240,7 @@ ve.init.mw.Target.static.importRules = {
// Annotations
'link', 'textStyle/span', 'textStyle/font', 'textStyle/underline', 'meta/language',
// Nodes
'inlineImage', 'blockImage', 'div', 'alienInline', 'alienBlock', 'comment'
'div', 'alienInline', 'alienBlock', 'comment'
],
removeOriginalDomElements: true
},

View file

@ -37,7 +37,10 @@ ve.test.utils.mwEnvironment = ( function () {
ve.dm.MWPreformattedNode,
ve.dm.MWTableNode
],
overridden = [];
overridden = [
ve.dm.InlineImageNode,
ve.dm.BlockImageNode
];
function setupOverrides() {
var i;