slab/delta

Word-level diff behavior

Closed this issue · 3 comments

diff doesn't make a difference at the word level but at the character level, and this ends up generating some semantic problems and causing bugs, would there be any way to change the word itself and not the letter?

For example using this logic:

https://codepen.io/percipient24/pen/eEBOjG

It is possible to notice that when there is an equal character, this character is ignored as a change. Many of the words get confused whenever there is an equal character in the middle of the word that I want to remove entirely.

I would like to know if it is possible to just change the word and mark the word and not the character level. Which way could I go?

In the example below I don't want it like this:

wrong png

but I would like it to be like this:

right

Can someone please help me find a way to replace words and not letters? I love quill js and I really need to implement this functionality

Please guys anyone can be save me?

luin commented

Hey @lujuste 👋 ,
Sorry for the delay! Now word level diffing is the default behavior.

@luin tks for reply! great job!
I will test! Thank you very much