Page MenuHomePhabricator

Mixed newline chars irritate the TwoColConflictHelper
Closed, ResolvedPublic2 Estimated Story Points


If the one TwoColConflictHelper gets input that uses \n\r newlines and the other has \n lines the edit merge screens will give irritating solving screens.

Screenshot_2018-10-11 Edit conflict Main Page - EnLocalWiki.png (230×1 px, 18 KB)

This could be fixed by unifying the symbols.

Found while working on T195724 and currently a blocker since the above this seems to happen when I try to integrate the conflict view in the preview and diff page.

Event Timeline

To elaborate on that:

We see a change although the left and right side seem identical. - The reason behind that is, that one side uses \n line breaks and the other \n\r. For the differ this clearly is a change. - During the work done related to new line handling we assume at one place, that both sides either have \n or \n\r line breaks. This might be not always the case, as the example shows.

Since this happened during my experiments with including the merge view into the diff and the preview, we should go back to the reason why this is happening there when reviewing the patch there. But an improvement to get rid of that general assumption is still useful. - Sprint approval by @Lea_WMDE ;-)

Change 467406 had a related patch set uploaded (by WMDE-Fisch; owner: WMDE-Fisch):
[mediawiki/extensions/TwoColConflict@master] Unify \r\n to \n newline chars in conflict helper

Change 467406 merged by jenkins-bot:
[mediawiki/extensions/TwoColConflict@master] Unify \r\n to \n newline chars in conflict helper