diff-match-patch icon indicating copy to clipboard operation
diff-match-patch copied to clipboard

How to diff for only added lines / changes?

Open grantspilsbury opened this issue 4 years ago • 1 comments

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.

grantspilsbury avatar Apr 13 '20 22:04 grantspilsbury

https://pypi.org/project/unidiff/ is likely better for that use-case, if you can get your text differences into that library' data structure.

jayvdb avatar Jul 19 '20 14:07 jayvdb