As noted there, we can't color both the background and text in green/red of different shades, like the HTML example does, because terminals only support a limited number of shades and "red" text on "bright red" background is almost completely illegible on some terminals. Therefore this PR swaps us from coloring ONLY the text to instead coloring ONLY the background. This should still clearly show what letters are added/deleted, but now also makes added/deleted spaces visible, which they weren't before.
Resolves https://github.com/kpdecker/jsdiff/issues/414
As noted there, we can't color both the background and text in green/red of different shades, like the HTML example does, because terminals only support a limited number of shades and "red" text on "bright red" background is almost completely illegible on some terminals. Therefore this PR swaps us from coloring ONLY the text to instead coloring ONLY the background. This should still clearly show what letters are added/deleted, but now also makes added/deleted spaces visible, which they weren't before.
Here's a screenshot showing the behaviour change: