quill-delta
Advanced tools
Comparing version 4.0.1 to 4.1.0
@@ -0,1 +1,5 @@ | ||
## v4.1.0 | ||
- Use fast-diff 1.2.0 in `diff()`, so that diffs do not split Unicode surrogate pairs | ||
## v4.0.1 | ||
@@ -2,0 +6,0 @@ |
@@ -0,1 +1,2 @@ | ||
import diff from 'fast-diff'; | ||
import AttributeMap from './AttributeMap'; | ||
@@ -25,3 +26,3 @@ import Op from './Op'; | ||
concat(other: Delta): Delta; | ||
diff(other: Delta, index?: number): Delta; | ||
diff(other: Delta, cursor?: number | diff.CursorInfo): Delta; | ||
eachLine(predicate: (line: Delta, attributes: AttributeMap, index: number) => boolean | void, newline?: string): void; | ||
@@ -28,0 +29,0 @@ transform(index: number, priority?: boolean): number; |
@@ -234,3 +234,3 @@ "use strict"; | ||
}; | ||
Delta.prototype.diff = function (other, index) { | ||
Delta.prototype.diff = function (other, cursor) { | ||
if (this.ops === other.ops) { | ||
@@ -251,3 +251,3 @@ return new Delta(); | ||
var retDelta = new Delta(); | ||
var diffResult = fast_diff_1.default(strings[0], strings[1], index); | ||
var diffResult = fast_diff_1.default(strings[0], strings[1], cursor); | ||
var thisIter = Op_1.default.iterator(this.ops); | ||
@@ -254,0 +254,0 @@ var otherIter = Op_1.default.iterator(other.ops); |
{ | ||
"name": "quill-delta", | ||
"version": "4.0.1", | ||
"version": "4.1.0", | ||
"description": "Format for representing rich text documents and changes.", | ||
@@ -11,3 +11,3 @@ "author": "Jason Chen <jhchen7@gmail.com>", | ||
"extend": "^3.0.2", | ||
"fast-diff": "1.1.2" | ||
"fast-diff": "1.2.0" | ||
}, | ||
@@ -17,3 +17,2 @@ "devDependencies": { | ||
"@types/extend": "^3.0.0", | ||
"@types/fast-diff": "^1.1.0", | ||
"coveralls": "^3.0.2", | ||
@@ -20,0 +19,0 @@ "istanbul": "~0.4.5", |
@@ -267,3 +267,3 @@ import equal from 'deep-equal'; | ||
diff(other: Delta, index?: number): Delta { | ||
diff(other: Delta, cursor?: number | diff.CursorInfo): Delta { | ||
if (this.ops === other.ops) { | ||
@@ -284,3 +284,3 @@ return new Delta(); | ||
const retDelta = new Delta(); | ||
const diffResult = diff(strings[0], strings[1], index); | ||
const diffResult = diff(strings[0], strings[1], cursor); | ||
const thisIter = Op.iterator(this.ops); | ||
@@ -287,0 +287,0 @@ const otherIter = Op.iterator(other.ops); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
79405
10
1253
1
+ Addedfast-diff@1.2.0(transitive)
- Removedfast-diff@1.1.2(transitive)
Updatedfast-diff@1.2.0