fnp
/
fnpeditor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
cleanup: removing unused vkbeautify library
[fnpeditor.git]
/
src
/
smartxml
/
core.js
diff --git
a/src/smartxml/core.js
b/src/smartxml/core.js
index
b40e9c3
..
f907a20
100644
(file)
--- a/
src/smartxml/core.js
+++ b/
src/smartxml/core.js
@@
-474,7
+474,7
@@
var documentTransformations = {
return insertion.ofNode;
},
deleteText: function(params) {
return insertion.ofNode;
},
deleteText: function(params) {
- var ptr, next, toDetach, middle, text;
+ var ptr, next,
nextNext,
toDetach, middle, text;
if(params.from.node.sameNode(params.to.node)) {
ptr = params.from.node;
if(params.from.node.sameNode(params.to.node)) {
ptr = params.from.node;
@@
-502,7
+502,11
@@
var documentTransformations = {
} else {
toDetach = next;
next = next.next();
} else {
toDetach = next;
next = next.next();
- toDetach.detach();
+ nextNext = next ? next.next() : null;
+ toDetach.detach({normalizeStrategy: (next && next.sameNode(params.to.node)) ? 'merge' : 'detach-right'});
+ if(next && !next.isInDocument()) {
+ next = nextNext;
+ }
}
} else {
ptr = ptr.parent();
}
} else {
ptr = ptr.parent();