> Could we change Lcs so that if both sides have a "" at the end, it
removes
> them first?
We could, and it actually looks like the diff code tries to drop equal
leading/trailing elements before diffing (as you'd expect). I'm not sure
that
is the right fix though, since we're providing diff with two lists that
contain elements that aren't technically lines (the last elements, in
the case
of EOF \n's).
> I think the problem with annotate may need a different fix (perhaps
change
> breakLines so it doesn't drop the last ""?)
My feeling is that annotate has the right implementation in terms of
splitting
into lines, so I'd rather change the other implementations first. But
I've not
thought through the consequences of that...
|