You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 5, 2024. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 5, 2024. It is now read-only.
While using the library, I have noticed that there is a serious problem with text diff, a very simple example is not working fine, looking at the code developed by google, it was hard for me to believe that, why it is not working fine. If you look at the screenshot below you will see that it is almost correct, but very wrong in results.
It is saying i have added certain lines, which were already a part of the original and input string.
Second, it has seriously messed up the order, in which they occur.
Hi @ogil7190 - I'm seeing what looks like accurate output, so maybe you could share what you see as being wrong in the output specifically.
It's not showing that you've added lines at all, for example, only that the last eight words and additional u letter are not present in the input after removing the rest of the first paragraph.
The diffs are a recipe to move from the first version to the second, and there's no guarantee that what it produces is going to be the same "edit script" you expect it to be. For some reason it recognized the long paragraph removal as a single deletion and added back in the part where the y changed into a u. It could have also deleted the y, inserted a u, kept the rest of the sentence, then deleted everything else.
The important point to note though is that the patch should generate the second text when applied to the first, which in this case it looks like it does.
Activity
dmsnell commentedon Apr 28, 2023
Hi @ogil7190 - I'm seeing what looks like accurate output, so maybe you could share what you see as being wrong in the output specifically.
It's not showing that you've added lines at all, for example, only that the last eight words and additional
uletter are not present in the input after removing the rest of the first paragraph.The diffs are a recipe to move from the first version to the second, and there's no guarantee that what it produces is going to be the same "edit script" you expect it to be. For some reason it recognized the long paragraph removal as a single deletion and added back in the part where the
ychanged into au. It could have also deleted they, inserted au, kept the rest of the sentence, then deleted everything else.The important point to note though is that the patch should generate the second text when applied to the first, which in this case it looks like it does.