detach: function() {
var next;
- if(this.parent() && this.isSurroundedByTextElements()) {
+ if(this.parent() && this.isSurroundedByTextNodes()) {
next = this.next();
this.prev().appendText(next.getText());
next.detach();
return myIdx < parentContents.length - 1 ? parentContents[myIdx+1] : null;
},
- isSurroundedByTextElements: function() {
+ isSurroundedByTextNodes: function() {
var prev = this.prev(),
next = this.next();
return prev && (prev.nodeType === Node.TEXT_NODE) && next && (next.nodeType === Node.TEXT_NODE);