Is there a way to compare if two change sets are equal? #19
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hi, I'm working on a plugin that creates changesets.
I was wondering, is there any way to compare if two changesets are equal? (I'm thinking along the lines of the
.eq()functions in ProseMirror model).Basically, I was hoping to compare the plugins
prevStatewith current state to determine whether to update decorations.It looks like this doesn't exist yet, but it should be rather straightforward to implement. I'd be open to a pull request that adds such a method.
Sure thing, any general advice?
Should comparing the
fromA/fromB/toA/toBsuffice? Also I suppose we could bail out quickly if the arrays are different lengths?You'd want to compare the spans too, I guess, and only return when the sets are entirely identical.