Open harmanbirdi opened 7 years ago
It would be extremely great to have this btw
I probably can't find time to work on this but would be happy to review/accept a PR for it.
On Wed, Sep 27, 2017 at 4:32 PM Dan Nolan notifications@github.com wrote:
It would be extremely great to have this btw
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/samg/diffy/issues/88#issuecomment-332684604, or mute the thread https://github.com/notifications/unsubscribe-auth/AABWhJSsswsLJDfA6Q2bIF0zgUoFRYF8ks5smtr_gaJpZM4OQRp6 .
I agree. This would be nice to have
I also came here to look for a way to remove this warning, but since I see this is a long-running open issue, and since it seems to be the accepted behavior for the underlying diff
command, I figured "if you can't beat them, join them". I am simply adding a newline to both compared strings before comparing:
def diff
@diff ||= Diffy::Diff.new("#{expected}\n", "#{actual}\n", context: 2).to_s :color
end
It does not make any sense for that message to show up on comparison of two strings. I have not seen the code, but seems like you are taking two strings, putting them in two files and comparing them. Could you provide an option to suppress that warning.
It would be nice to not be able to see that warning especially when comparing a lot of strings.