You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So under the hypothesis that those two lines are a genuine match, then 1/3 of the characters have been changed in an edit operation.
So if we set --max-line-distance below 1/3, Delta says: those are too different, I'm not convinced that's a genuine matching pair of lines.
But if we set it to, say, 0.333334 then it accepts them as a genuine homologous pair.
Discussion of how we might develop delta's line-matching algorithms is in #140, which also describes an experimental environment variable which can be used to convince delta to always match lines naively when there are the same number of plus and minus lines (that's what other tools such as diff-highlight, diff-so-fancy, github, do). I'll close this and we can discuss there, but further thoughts/opinions/ideas are really welcome here. I think it's an area that benefits from multiple people being involved, not least as we all use different languages with different syntax characteristics.
delta version: built from master @ bbbd722
diff -u:
delta:
baz_qux
is not highlightedWith
--max-line-distance=0.4
the word is highlighted as expected.This might be a duplicate of #184 so feel free to close it.
The text was updated successfully, but these errors were encountered: