@ckeditor/ckeditor5-engine 47.6.0 → 47.6.1-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +14 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/model/operation/transform.js +14 -1
package/dist/index.js
CHANGED
|
@@ -28758,7 +28758,20 @@ const transformations = new Map();
|
|
|
28758
28758
|
// `markerOps.get( op.name )` must exist because original marker operation is always before partial marker operations.
|
|
28759
28759
|
// If the original marker operation was changed to `NoOperation`, then the partial marker operations would be changed
|
|
28760
28760
|
// to `NoOperation` as well, so this is not a case.
|
|
28761
|
-
markerOps.get(op.name).ranges
|
|
28761
|
+
const partialRanges = markerOps.get(op.name).ranges;
|
|
28762
|
+
// `refRange` is the range coming from the original operation.
|
|
28763
|
+
const refRange = partialRanges[0];
|
|
28764
|
+
// Filter out ranges that are inside the reference range.
|
|
28765
|
+
//
|
|
28766
|
+
// We don't need to combine them, as the reference range already includes `op.newRange`. At the same time, the method
|
|
28767
|
+
// `ModelRange._createFromRanges()` (which we use later on) prohibits passing intersecting ranges and works incorrectly when
|
|
28768
|
+
// such array of ranges is passed.
|
|
28769
|
+
//
|
|
28770
|
+
// Note, that there cannot be a situation where these ranges intersect but are not contained.
|
|
28771
|
+
//
|
|
28772
|
+
if (!refRange.containsRange(op.newRange, true)) {
|
|
28773
|
+
partialRanges.push(op.newRange);
|
|
28774
|
+
}
|
|
28762
28775
|
}
|
|
28763
28776
|
operations.splice(i, 1);
|
|
28764
28777
|
i--;
|