Skip to content

Commit

Permalink
Normalize code style
Browse files Browse the repository at this point in the history
  • Loading branch information
jugglinmike committed May 27, 2017
1 parent 07bac2d commit bedd8e7
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions lib/api/manipulation.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,19 +157,19 @@ exports.wrap = function(wrapper) {

wrapperDom = this._makeDomArray(wrapper, i < lastIdx).slice(0, 1);
elInsertLocation = wrapperDom[0];
//Find the deepest child
//Only consider the first tag child of each node (ignore text)
//We stop if we can no longer identify any new children
// Find the deepest child. Only consider the first tag child of each node
// (ignore text); stop if no children are found.
j = 0;

while (elInsertLocation && elInsertLocation.children) {
if(j >= elInsertLocation.children.length){
if (j >= elInsertLocation.children.length) {
break;
}
if (elInsertLocation.children[j].type === 'tag'){

if (elInsertLocation.children[j].type === 'tag') {
elInsertLocation = elInsertLocation.children[j];
j=0;
}
else{
} else {
j++;
}
}
Expand Down

0 comments on commit bedd8e7

Please sign in to comment.