From 8f005fa1ae22c8a38e4480ea722873383bf55443 Mon Sep 17 00:00:00 2001 From: Rob Moen Date: Mon, 24 Jun 2013 15:20:08 -0700 Subject: [PATCH] Don't put slugs after internal nodes. Bug: 50132 Change-Id: I3818ebe9816e7d781233f087b15694bf7ba12965 --- modules/ve/ce/ve.ce.BranchNode.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/ve/ce/ve.ce.BranchNode.js b/modules/ve/ce/ve.ce.BranchNode.js index c6d6050524..5e4959eaba 100644 --- a/modules/ve/ce/ve.ce.BranchNode.js +++ b/modules/ve/ce/ve.ce.BranchNode.js @@ -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 );