github udecode/plate @udecode/plate-diff@30.8.0

latest releases: @udecode/plate-table@38.0.6, @udecode/plate@38.0.6, @udecode/plate-utils@38.0.6...
6 months ago

Minor Changes

  • #3009 by @12joan
    • Add shouldDiffDescendants option to computeDiff to control whether a pair of descendant lists should be diffed. If false, the parent node will be deleted and re-inserted. Defaults to () => true.
      • Example use case: To prevent computeDiff from diffing the text of unrelated paragraphs, use a text similarity checking algorithm to determine whether the paragraphs are sufficiently similar, and return false if not.
    • When multiple consecutive nodes have been deleted and inserted, computeDiff now groups all consecutive deletions together and does the same with all consecutive insertions.
      • Example of a diff prior to this change:
        - Old paragraph 1
        + New paragraph 1
        - Old paragraph 2
        + New paragraph 2
      • Example of a diff after this change:
        - Old paragraph 1
        - Old paragraph 2
        + New paragraph 1
        + New paragraph 2

Don't miss a new plate release

NewReleases is sending notifications on new releases.