Closed franktzheng closed 5 years ago
Thanks! I'll take a look at this asap. (maybe after I publish my next video this weekend)
Hi, FYI, I just added the MIT license to this project.
Just wanted to let you know about it since this pull request might be the first major PR that's not made by me.
Okay, I might change the function to my version later, but the whole layout of this PR is really helpful. So, I'll merge it for now and probably change the implementation a bit later.
I used the longest common subsequence algorithm to create a text difference finder. I added the Javascript and CSS into a global static folder, which I registered in settings.py.
The text difference finder is in
text_difference.js
and can be called with the functionfindTextDifference()
. The function returns an array of 3 strings: one that shows the deletions and additions, one that shows only the deletions, and one that shows only the additions. Each string is formatted using a span element with either a "deleted" or "added" class.