concordancejs / concordance

Compare, format, diff and serialize any JavaScript value
ISC License
207 stars 15 forks source link

Inline diffing should prioritize diffing whole words #29

Open sindresorhus opened 7 years ago

sindresorhus commented 7 years ago

Unless the words are very long. AFAIK that's how Git diffing works too.

We don't want this (current):

screen shot 2017-06-27 at 20 46 09
novemberborn commented 7 years ago

Do you have suggestions for when a word is too long?

I assume this should go up to the word boundary /\b/, not just whitespace?

sindresorhus commented 7 years ago

Do you have suggestions for when a word is too long?

Something arbitrary. Maybe 30 characters? Wonder how the Git diff algorithm handles this.

I assume this should go up to the word boundary /\b/, not just whitespace?

Yes


Some relevant resources:

novemberborn commented 5 years ago

This may be useful: https://github.com/aceakash/string-similarity

sindresorhus commented 5 years ago

I think we should disable word diffing until we can implement something better. The digging continues to be unusable. I’m often using console log.

IssueHuntBot commented 5 years ago

@issuehunt has funded $80.00 to this issue.