Jump to content

Community Wishlist Survey 2021/Editing/Better diff handling of paragraph splits

From Meta, a Wikimedia project coordination wiki

Better diff handling of paragraph splits

  • Problem: When an editor adds line breaks to split an existing paragraph, our diff viewer depicts the text as deleted and re-added rather than just repurposed. This makes it difficult to see what text changed between the two paragraphs.
  • Who would benefit: Editors and readers who view diffs of this fairly common type of edit
  • Proposed solution: Directly compare the text changes between the "deleted" text and the new paragraphs, similar to how this handled moved paragraphs
  • More comments: This is a perennial request with continued need. It ranked #13 in 2016, and it appeared in the 2019 wishlist if not elsewhere
  • Phabricator tickets: task T156439, task T7072
  • Proposer: czar 02:11, 22 November 2020 (UTC)[reply]


  • Support for this! Maybe they could internally do a sentence-by-sentence diff, i.e. put every sentence in a new line before running diff.
  • The improved diff view of wikEdDiff handles this case well. Certes (talk) 00:38, 23 November 2020 (UTC)[reply]
  • Strong Support. It is useful for all editors, but I think it would also help in-experienced editors become more comfortable with editing. The instant feedback such a function would give would be very nice. Mulstev (talk) 07:10, 28 November 2020 (UTC)[reply]

Since wikimarkup treats a single line-break as a space, the diff tool should use both sections for the compare. If a line-break is removed two sections would be compared with the resulting single section. If a line break is added the original section would be compared with the resulting 2 sections. I would not suggest displaying every sentence as a new line; adding or removing periods would then have the same effect as adding or removing line-breaks. But it may be beneficial to increase the importance of sentence breaks in the diff. User-duck (talk) 18:50, 8 December 2020 (UTC)[reply]

For the English Wikipedia, I suggest you try wikEdDiff (it's in the gadgets). In my opinion a much better diff than the standard one in most cases. It does not replace the standard one, it's just in addition on the top. --Ita140188 (talk) 15:37, 13 December 2020 (UTC)[reply]

Overlaps with WMDE Technical Wishes/Edit Conflicts.--Snaevar (talk) 14:39, 21 December 2020 (UTC)[reply]