Skip to content

Commit c74d2c1

Browse files
committed
fix: switch to @dmsnell/diff-match-patch fix #378
1 parent 44ad4c2 commit c74d2c1

File tree

7 files changed

+77
-230
lines changed

7 files changed

+77
-230
lines changed

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -199,10 +199,11 @@ In a browser, you can load a bundle using a tool like [esm.sh](https://esm.sh) o
199199

200200
## Options
201201

202-
```tsimport * as jsondiffpatch from 'jsondiffpatch';
202+
```ts
203+
import * as jsondiffpatch from 'jsondiffpatch';
203204

204205
// Only import if you want text diffs using diff-match-patch
205-
import DiffMatchPatch from 'diff-match-patch';
206+
import { diff_match_patch } from '@dmsnell/diff-match-patch';
206207

207208
const jsondiffpatchInstance = jsondiffpatch.create({
208209
// used to match objects when diffing arrays, by default only === operator is used
@@ -219,8 +220,8 @@ const jsondiffpatchInstance = jsondiffpatch.create({
219220
textDiff: {
220221
// If using text diffs, it's required to pass in the diff-match-patch library in through this proprty.
221222
// Alternatively, you can import jsondiffpatch using `jsondiffpatch/with-text-diffs` to avoid having to pass in diff-match-patch through the options.
222-
diffMatchPatch: DiffMatchPatch,
223-
// default 60, minimum string length (left and right sides) to use text diff algorythm: google-diff-match-patch
223+
diffMatchPatch: diff_match_patch,
224+
// default 60, minimum string length (left and right sides) to use text diff algorithm: google-diff-match-patch
224225
minLength: 60,
225226
},
226227
propertyFilter: function (name, context) {

0 commit comments

Comments
 (0)