diff-match-patch
diff-match-patch copied to clipboard
How to diff for only added lines / changes?
I want to generate a unified diff string but for only added lines / changes. I have a view that I want to either highlight added OR removed lines, but not both at the same time. Is there a way to diff for ONLY added lines.
https://pypi.org/project/unidiff/ is likely better for that use-case, if you can get your text differences into that library' data structure.