jeffkaufman/icdiff

The color is not reset between the line?

bangzek opened this issue · 6 comments

Is it me or the color is not reset between the line?

screenshot

Feel free to use these as test case:

json.txt
cbor.txt

What is exactly the problem? I don't see anything strange.

Could you upload a version of your screenshot with an arrow or circle showing the part you think is wrong?

So my normies expectation is to have the color on line containing:

  • delivery_1
  • delivery_2
  • delivery_4
  • delivery_5
    to start coloring on number 16 at the left and 9 at the right.

In other words, I expect the coloring to reset after each line. So I could use the color as the smallest change in each line.

I am not familiar with the code, but I think difflib._mdiff returned those lines as delete + insert instead of changed. Likely because a big part of the line is changed.

Thanks bangzek! I think bjorn3 Is correct: the underlying diffing library icdiff is using is not able to handle the level of change on those lines.