wickedest / Mergely

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

Does not distinguish between `` \n `` vs `` \r\n `` #154

Closed mmikeww closed 3 years ago

mmikeww commented 3 years ago

I just tested the online tool on the site. No diff is showing up when I paste in the same line with different newline endings

wickedest commented 3 years ago

confirmed

wickedest commented 3 years ago

So the issue is actually just configuration related as discussed here. You would need to add lineSeparator: '\n' to cmsettings.

$('#compare').mergely({
    width: 'auto',
    height: 'auto',
    cmsettings: { readOnly: false, lineSeparator: '\n' },
});
mmikeww commented 3 years ago

thank you, it works

mmikeww commented 3 years ago

since mergely is a diff tool, probably worthwhile to somehow set a default or recommendation for users