How to reconstruct edited text given the original and the diff from the edit?

102 views Asked by At

When analysing some blockchain content, I see that each new comment is stored as plain text, but any subsequent edits are stored as diffs from the original.

I would like to know if there is an simple way to reconstruct the edited comments from the original plus the diffs, preferably using Python difflib (or another Python library).

I would have thought difflib would make it easy, but I can't see a function to use.

0

There are 0 answers