wickedest / Mergely

Merge and diff documents online
http://www.mergely.com
Other
1.17k stars 228 forks source link

mergely too eager to find common text #5

Closed eminence closed 11 years ago

eminence commented 11 years ago

Mergely sometimes it a little too eager when trying to find common text. Here's a silly, made up example:

http://www.mergely.com/HA4vHsTS/

Line 5 (on the left, or line 4 on the right), the content is pretty much entirely different. However, mergely highlights it to show that "ar and "o" are in common between both lines. This in practice, is useless, since these are letters in the middle of works that happen to be common. I'd prefer it if mergely simply marked these entire lines as different (like is does for line 4left, 3right)

Is this a reasonable tweak to make?

wickedest commented 11 years ago

Hi Andrew,

Thanks for your example. There are other similar issues with Mergely's character-by-character comparison (LCS algorithm) for changes between lines. I'm working on a better? one that does word-by-word comparison. In most cases, I think this would produce better results. It might be ready in a couple of weeks.

Jamie

On 10 April 2013 04:12, Andrew Chin notifications@github.com wrote:

Mergely sometimes it a little too eager when trying to find common text. Here's a silly, made up example:

http://www.mergely.com/HA4vHsTS/

Line 5 (on the left, or line 4 on the right), the content is pretty much entirely different. However, mergely highlights it to show that "ar and "o" are in common between both lines. This in practice, is useless, since these are letters in the middle of works that happen to be common. I'd prefer it if mergely simply marked these entire lines as different (like is does for line 4left, 3right)

Is this a reasonable tweak to make?

— Reply to this email directly or view it on GitHubhttps://github.com/wickedest/Mergely/issues/5 .

wickedest commented 11 years ago

Changed the algorithm to work word-by-word.