mookid/diffr

Don't highlight leading spaces

Closed this issue · 0 comments

For performance reason, consecutive whitespaces are considered one word. The downside of this design decision is that when lines differ on the indentation, leading spaces are highlighted, which gives little interesting information:

image

One possible improvement would be either

  • never highlight leading spaces
  • process again the leading word of each line and highlight only the added spaces (harder, as keeping track of matching lines is required).