Don't do evil shadowing of mw

Having local variable called mw that shadows the global variable mw
is evil. Rename it to mwAttr.

Change-Id: I87bd3698c73608076424c10fdb0559dfdc3e3045
This commit is contained in:
Catrope 2013-05-26 14:34:47 +02:00
parent 23595970fe
commit cba55b9330

View file

@ -57,7 +57,7 @@ ve.dm.MWReferenceNode.static.toDataElement = function ( domElements, converter )
};
ve.dm.MWReferenceNode.static.toDomElements = function ( dataElement, doc, converter ) {
var itemNodeHtml, mw,
var itemNodeHtml, mwAttr,
span = doc.createElement( 'span' ),
itemNodeWrapper = doc.createElement( 'div' ),
itemNode = converter.internalList.getItemNode( dataElement.attributes.listIndex ),
@ -72,9 +72,9 @@ ve.dm.MWReferenceNode.static.toDomElements = function ( dataElement, doc, conver
),
itemNodeHtml = $( itemNodeWrapper ).html();
mw = ( dataElement.attributes && ve.copyObject( dataElement.attributes.mw ) ) || {};
ve.setProp( mw, 'body', 'html', itemNodeHtml );
span.setAttribute( 'data-mw', JSON.stringify( mw ) );
mwAttr = ( dataElement.attributes && ve.copyObject( dataElement.attributes.mw ) ) || {};
ve.setProp( mwAttr, 'body', 'html', itemNodeHtml );
span.setAttribute( 'data-mw', JSON.stringify( mwAttr ) );
return [ span ];
};