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

diff_cleanupSemantic cleans last newline incorrect

Open Alisis33 opened this issue 2 years ago • 4 comments

The cleaner methodes like diff_cleanupSemantic not correct the last newline like expected. Sometimes (by multiple line insert/delete) the result grabs a newline character from the line before, and cut his own of. It would be better if complete lines are inserted/deleted. I made my own cleaner to correct this and I can post it here, but it should be done in the diff_cleanup.

(tested only with the cs code)

Alisis33 avatar Oct 25 '22 23:10 Alisis33

Screenshot_1

Alisis33 avatar Oct 26 '22 11:10 Alisis33

How it is now

Alisis33 avatar Oct 26 '22 11:10 Alisis33

Screenshot_2

Alisis33 avatar Oct 26 '22 11:10 Alisis33

After correction

Alisis33 avatar Oct 26 '22 11:10 Alisis33