Merge "Specify suggested parent node types for tables"

This commit is contained in:
jenkins-bot 2017-05-04 18:50:48 +00:00 committed by Gerrit Code Review
commit 75b762d5c4

View file

@ -41,6 +41,9 @@ ve.dm.MWTableNode.static.classAttributes = {
'mw-collapsed': { collapsed: true }
};
// Tables in wikitext only work in some contexts, they're impossible e.g. in list items
ve.dm.MWTableNode.static.suggestedParentNodeTypes = [ 'document', 'div', 'tableCell', 'tableCaption', 'mwImageCaption' ];
// HACK: users of parentNodeTypes should be fixed to check for inherited classes.
ve.dm.TableSectionNode.static.parentNodeTypes.push( 'mwTable' );
ve.dm.TableCaptionNode.static.parentNodeTypes.push( 'mwTable' );