Don't put slugs after internal nodes.

Bug: 50132
Change-Id: I3818ebe9816e7d781233f087b15694bf7ba12965
This commit is contained in:
Rob Moen 2013-06-24 15:20:08 -07:00
parent 2352613b66
commit 8f005fa1ae

View file

@ -233,6 +233,10 @@ ve.ce.BranchNode.prototype.setupSlugs = function () {
} else {
// Iterate over all children of this branch and add slugs in appropriate places
for ( i = 0, len = this.children.length; i < len; i++ ) {
// Don't put slugs after internal nodes.
if ( ve.dm.nodeFactory.isNodeInternal( this.children[i].model.type ) ) {
continue;
}
// First sluggable child (left side)
if ( i === 0 && this.children[i].canHaveSlugBefore() ) {
this.slugs[i] = doc.importNode( slug, true );