Merge "Always use multi-part format for transclusions"

This commit is contained in:
jenkins-bot 2013-09-18 00:39:54 +00:00 committed by Gerrit Code Review
commit 51a1d4da39

View file

@ -59,6 +59,7 @@ ve.dm.MWTransclusionModel.prototype.load = function ( data ) {
var i, len, part;
// Convert single part format to multi-part format
// Parsoid doesn't use this format any more, but we accept it for backwards compatibility
if ( data.params && data.target ) {
data = { 'parts': [ { 'template': data } ] };
}
@ -244,11 +245,6 @@ ve.dm.MWTransclusionModel.prototype.getPlainObject = function () {
return null;
}
// Use single-part format when possible
if ( obj.parts.length === 1 ) {
obj = obj.parts[0].template;
}
return obj;
};