@atlaskit/editor-plugin-show-diff 3.2.6 → 3.2.7
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-show-diff
|
|
2
2
|
|
|
3
|
+
## 3.2.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`bc52c059565f2`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/bc52c059565f2) -
|
|
8
|
+
Fix issue with simplify changes being too aggressive and dropping steps causing diffs to fail.
|
|
9
|
+
|
|
3
10
|
## 3.2.6
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
|
@@ -23,7 +23,9 @@ function mergeReplaceSteps(step1, step2) {
|
|
|
23
23
|
if (!(step1 instanceof _transform.ReplaceStep) || !(step2 instanceof _transform.ReplaceStep)) {
|
|
24
24
|
return null;
|
|
25
25
|
}
|
|
26
|
-
|
|
26
|
+
// Confirm the step overlaps exactly with the previous
|
|
27
|
+
var step2Length = step2.to - step2.from;
|
|
28
|
+
if (step1.from === step2.from && step2.to >= step1.to && step2.slice.size >= step2Length && step2Length === step1.slice.size && step2.slice.size >= step1.slice.size && step1.slice.openEnd === step2.slice.openEnd && step1.slice.openStart === step2.slice.openStart) {
|
|
27
29
|
return new _transform.ReplaceStep(step1.from, step1.to, step2.slice);
|
|
28
30
|
}
|
|
29
31
|
return null;
|
|
@@ -15,7 +15,9 @@ function mergeReplaceSteps(step1, step2) {
|
|
|
15
15
|
if (!(step1 instanceof ReplaceStep) || !(step2 instanceof ReplaceStep)) {
|
|
16
16
|
return null;
|
|
17
17
|
}
|
|
18
|
-
|
|
18
|
+
// Confirm the step overlaps exactly with the previous
|
|
19
|
+
const step2Length = step2.to - step2.from;
|
|
20
|
+
if (step1.from === step2.from && step2.to >= step1.to && step2.slice.size >= step2Length && step2Length === step1.slice.size && step2.slice.size >= step1.slice.size && step1.slice.openEnd === step2.slice.openEnd && step1.slice.openStart === step2.slice.openStart) {
|
|
19
21
|
return new ReplaceStep(step1.from, step1.to, step2.slice);
|
|
20
22
|
}
|
|
21
23
|
return null;
|
|
@@ -18,7 +18,9 @@ function mergeReplaceSteps(step1, step2) {
|
|
|
18
18
|
if (!(step1 instanceof ReplaceStep) || !(step2 instanceof ReplaceStep)) {
|
|
19
19
|
return null;
|
|
20
20
|
}
|
|
21
|
-
|
|
21
|
+
// Confirm the step overlaps exactly with the previous
|
|
22
|
+
var step2Length = step2.to - step2.from;
|
|
23
|
+
if (step1.from === step2.from && step2.to >= step1.to && step2.slice.size >= step2Length && step2Length === step1.slice.size && step2.slice.size >= step1.slice.size && step1.slice.openEnd === step2.slice.openEnd && step1.slice.openStart === step2.slice.openStart) {
|
|
22
24
|
return new ReplaceStep(step1.from, step1.to, step2.slice);
|
|
23
25
|
}
|
|
24
26
|
return null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-show-diff",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.7",
|
|
4
4
|
"description": "ShowDiff plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -32,14 +32,14 @@
|
|
|
32
32
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
33
33
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
34
34
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
35
|
-
"@atlaskit/tokens": "^8.
|
|
35
|
+
"@atlaskit/tokens": "^8.3.0",
|
|
36
36
|
"@babel/runtime": "^7.0.0",
|
|
37
37
|
"lodash": "^4.17.21",
|
|
38
38
|
"memoize-one": "^6.0.0",
|
|
39
39
|
"prosemirror-changeset": "^2.2.1"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"@atlaskit/editor-common": "^110.
|
|
42
|
+
"@atlaskit/editor-common": "^110.35.0",
|
|
43
43
|
"react": "^18.2.0"
|
|
44
44
|
},
|
|
45
45
|
"techstack": {
|