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
As discussions are not enabled for this repository, I hope you don't mind I create an issue to discuss this suggestion. It's not a huge optimization but since the goal of this library is to reduce the size of the output diff, wouldn't it be more efficient to flatten the output array and apply the following logic:
DELETE === a negative number
EQUAL === a positive number
INSERT === a string
// fast-diff: 86 chars[[0,"The "],[-1,"sleepy"],[1,"quick"],[0," brown fox"],[1," jumps over the lazy dog"]]// textdiff-create: 64 chars[[0,4],[-1,6],[1,"quick"],[0,10],[1," jumps over the lazy dog"]]// proposal: 44 chars[4,-6,"quick",10," jumps over the lazy dog"]
The text was updated successfully, but these errors were encountered:
Hi @icflorescu.
As discussions are not enabled for this repository, I hope you don't mind I create an issue to discuss this suggestion. It's not a huge optimization but since the goal of this library is to reduce the size of the output diff, wouldn't it be more efficient to flatten the output array and apply the following logic:
The text was updated successfully, but these errors were encountered: