From a5c897372598dde9ebc8ef3606de28421a6cc639 Mon Sep 17 00:00:00 2001 From: zbeyens Date: Wed, 7 Feb 2024 16:38:31 +0100 Subject: [PATCH 1/2] fix --- .../src/slate-diff/internal/transforms/transformDiffTexts.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/suggestion/src/slate-diff/internal/transforms/transformDiffTexts.ts b/packages/suggestion/src/slate-diff/internal/transforms/transformDiffTexts.ts index 35c49698da..d3a0966358 100644 --- a/packages/suggestion/src/slate-diff/internal/transforms/transformDiffTexts.ts +++ b/packages/suggestion/src/slate-diff/internal/transforms/transformDiffTexts.ts @@ -46,6 +46,7 @@ export function transformDiffTexts( function slateTextDiff(a: string, b: string): Op[] { // Compute the diff between two strings const diff = dmp.diff_main(a, b); + dmp.diff_cleanupSemantic(diff); const operations: Op[] = []; From 3587811450261b043f64807a5e9a41a8b3cc812f Mon Sep 17 00:00:00 2001 From: Ziad Beyens Date: Wed, 7 Feb 2024 16:39:32 +0100 Subject: [PATCH 2/2] Create proud-papayas-check.md --- .changeset/proud-papayas-check.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/proud-papayas-check.md diff --git a/.changeset/proud-papayas-check.md b/.changeset/proud-papayas-check.md new file mode 100644 index 0000000000..239654fbc7 --- /dev/null +++ b/.changeset/proud-papayas-check.md @@ -0,0 +1,5 @@ +--- +"@udecode/plate-suggestion": patch +--- + +fix slateTextDiff