mookid/diffr

Avoid skipping dots and other special chars

kgrz opened this issue · 2 comments

kgrz commented

I've put up a repo for demonstrating this: https://github.com/kgrz/diffr-issue

I've seen this happen with dots, hyphens, = and some words too. Another example:

Screenshot 2019-09-10 at 14 44 53

kgrz commented

I rechecked this with a dark theme, without any extra configs for diffr v0.1.2:

Screenshot 2019-09-10 at 14 47 40

Ignore the part with the blue background. That's just search result highlighting in less.

Ok, so the issue is this diff:
image

dot is treated as a word of its own, and is part of the LCS in the first diff:
the . following 10 matches the one following example.

This allows to highlight finer differences: for instance,

-foo.bar.baz
+foo.bar.baq

diffr should highlight baz and baq, rather than the whole lines.

What do you expect the highlighting to be?